Skip to content

Commit 75563ce

Browse files
committed
feat(block): support theme-specific block-strong-[ios|md] states
1 parent e123021 commit 75563ce

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

src/core/components/block/block.less

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
}
2626
}
2727
}
28-
.block-strong {
28+
.block-strong,
29+
.ios .block-strong-ios,
30+
.md .block-strong-md {
2931
color: var(--f7-block-strong-text-color);
3032
padding-top: var(--f7-block-padding-vertical);
3133
padding-bottom: var(--f7-block-padding-vertical);
@@ -168,8 +170,12 @@
168170
--f7-safe-area-right: 0px;
169171
}
170172
.block-strong.inset,
173+
.ios .block-strong-ios.inset,
174+
.md .block-strong-md.inset,
171175
.ios .block-strong.inset-ios,
172-
.md .block-strong.inset-md {
176+
.md .block-strong.inset-md,
177+
.ios .block-strong-ios.inset-ios,
178+
.md .block-strong-md.inset-md {
173179
.hairline-remove-top-bottom();
174180
}
175181

@@ -178,17 +184,19 @@ each(@breakpoints, {
178184
.block.@{key}-inset,
179185
.ios .block.@{key}-inset-ios,
180186
.md .block.@{key}-inset-md {
187+
.hairline-remove-top-bottom();
181188
border-radius: var(--f7-block-inset-border-radius);
182189
margin-left: calc(var(--f7-block-inset-side-margin) + var(--f7-safe-area-outer-left));
183190
margin-right: calc(var(--f7-block-inset-side-margin) + var(--f7-safe-area-outer-right));
184191
--f7-safe-area-left: 0px;
185192
--f7-safe-area-right: 0px;
186-
&.block-outline,
187-
.ios &.block-outline-ios,
188-
.md &.block-outline-md {
189-
.hairline-remove-top-bottom();
193+
}
194+
.block.@{key}-inset.block-outline,
195+
.ios .block.@{key}-inset-ios.block-outline,
196+
.ios .block.@{key}-inset-ios.block-outline-ios,
197+
.md .block.@{key}-inset-md.block-outline,
198+
.md .block.@{key}-inset-md.block-outline-md {
190199
border: 1px solid var(--f7-block-outline-border-color);
191-
}
192200
}
193201
}
194202
});

src/react/components/block.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ import { useTab } from '../shared/use-tab.js';
2626
xlargeInsetIos?: boolean
2727
xlargeInsetMd?: boolean
2828
strong?: boolean
29+
strongIos?: boolean
30+
strongMd?: boolean
2931
outline?: boolean
3032
outlineIos?: boolean
3133
outlineMd?: boolean
@@ -63,6 +65,8 @@ const Block = forwardRef((props, ref) => {
6365
xlargeInsetIos,
6466
xlargeInsetMd,
6567
strong,
68+
strongIos,
69+
strongMd,
6670
outline,
6771
outlineIos,
6872
outlineMd,
@@ -108,6 +112,8 @@ const Block = forwardRef((props, ref) => {
108112
'xlarge-inset-ios': xlargeInsetIos,
109113
'xlarge-inset-md': xlargeInsetMd,
110114
'block-strong': strong,
115+
'block-strong-ios': strongIos,
116+
'block-strong-md': strongMd,
111117
'block-outline': outline,
112118
'block-outline-ios': outlineIos,
113119
'block-outline-md': outlineMd,

src/svelte/components/block.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
export let xlargeInsetIos = false;
2727
export let xlargeInsetMd = false;
2828
export let strong = false;
29+
export let strongIos = false;
30+
export let strongMd = false;
2931
export let tabs = false;
3032
export let tab = false;
3133
export let tabActive = false;
@@ -63,6 +65,8 @@
6365
'xlarge-inset-ios': xlargeInsetIos,
6466
'xlarge-inset-md': xlargeInsetMd,
6567
'block-strong': strong,
68+
'block-strong-ios': strongIos,
69+
'block-strong-md': strongMd,
6670
'accordion-list': accordionList,
6771
'accordion-opposite': accordionOpposite,
6872
tabs,

src/vue/components/block.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default {
3131
xlargeInsetIos: Boolean,
3232
xlargeInsetMd: Boolean,
3333
strong: Boolean,
34+
strongIos: Boolean,
35+
strongMd: Boolean,
3436
outline: Boolean,
3537
outlineIos: Boolean,
3638
outlineMd: Boolean,
@@ -68,6 +70,8 @@ export default {
6870
xlargeInsetIos,
6971
xlargeInsetMd,
7072
strong,
73+
strongIos,
74+
strongMd,
7175
outline,
7276
outlineIos,
7377
outlineMd,
@@ -99,6 +103,8 @@ export default {
99103
'xlarge-inset-ios': xlargeInsetIos,
100104
'xlarge-inset-md': xlargeInsetMd,
101105
'block-strong': strong,
106+
'block-strong-ios': strongIos,
107+
'block-strong-md': strongMd,
102108
'accordion-list': accordionList,
103109
'accordion-opposite': accordionOpposite,
104110
tabs,

0 commit comments

Comments
 (0)