(Translated by https://www.hiragana.jp/)
feat(block): support theme-specific `block-strong-[ios|md]` states · framework7io/framework7@75563ce · GitHub
Skip to content

Commit

Permalink
feat(block): support theme-specific block-strong-[ios|md] states
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Sep 26, 2022
1 parent e123021 commit 75563ce
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/core/components/block/block.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
}
}
}
.block-strong {
.block-strong,
.ios .block-strong-ios,
.md .block-strong-md {
color: var(--f7-block-strong-text-color);
padding-top: var(--f7-block-padding-vertical);
padding-bottom: var(--f7-block-padding-vertical);
Expand Down Expand Up @@ -168,8 +170,12 @@
--f7-safe-area-right: 0px;
}
.block-strong.inset,
.ios .block-strong-ios.inset,
.md .block-strong-md.inset,
.ios .block-strong.inset-ios,
.md .block-strong.inset-md {
.md .block-strong.inset-md,
.ios .block-strong-ios.inset-ios,
.md .block-strong-md.inset-md {
.hairline-remove-top-bottom();
}

Expand All @@ -178,17 +184,19 @@ each(@breakpoints, {
.block.@{key}-inset,
.ios .block.@{key}-inset-ios,
.md .block.@{key}-inset-md {
.hairline-remove-top-bottom();
border-radius: var(--f7-block-inset-border-radius);
margin-left: calc(var(--f7-block-inset-side-margin) + var(--f7-safe-area-outer-left));
margin-right: calc(var(--f7-block-inset-side-margin) + var(--f7-safe-area-outer-right));
--f7-safe-area-left: 0px;
--f7-safe-area-right: 0px;
&.block-outline,
.ios &.block-outline-ios,
.md &.block-outline-md {
.hairline-remove-top-bottom();
}
.block.@{key}-inset.block-outline,
.ios .block.@{key}-inset-ios.block-outline,
.ios .block.@{key}-inset-ios.block-outline-ios,
.md .block.@{key}-inset-md.block-outline,
.md .block.@{key}-inset-md.block-outline-md {
border: 1px solid var(--f7-block-outline-border-color);
}
}
}
});
Expand Down
6 changes: 6 additions & 0 deletions src/react/components/block.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { useTab } from '../shared/use-tab.js';
xlargeInsetIos?: boolean
xlargeInsetMd?: boolean
strong?: boolean
strongIos?: boolean
strongMd?: boolean
outline?: boolean
outlineIos?: boolean
outlineMd?: boolean
Expand Down Expand Up @@ -63,6 +65,8 @@ const Block = forwardRef((props, ref) => {
xlargeInsetIos,
xlargeInsetMd,
strong,
strongIos,
strongMd,
outline,
outlineIos,
outlineMd,
Expand Down Expand Up @@ -108,6 +112,8 @@ const Block = forwardRef((props, ref) => {
'xlarge-inset-ios': xlargeInsetIos,
'xlarge-inset-md': xlargeInsetMd,
'block-strong': strong,
'block-strong-ios': strongIos,
'block-strong-md': strongMd,
'block-outline': outline,
'block-outline-ios': outlineIos,
'block-outline-md': outlineMd,
Expand Down
4 changes: 4 additions & 0 deletions src/svelte/components/block.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
export let xlargeInsetIos = false;
export let xlargeInsetMd = false;
export let strong = false;
export let strongIos = false;
export let strongMd = false;
export let tabs = false;
export let tab = false;
export let tabActive = false;
Expand Down Expand Up @@ -63,6 +65,8 @@
'xlarge-inset-ios': xlargeInsetIos,
'xlarge-inset-md': xlargeInsetMd,
'block-strong': strong,
'block-strong-ios': strongIos,
'block-strong-md': strongMd,
'accordion-list': accordionList,
'accordion-opposite': accordionOpposite,
tabs,
Expand Down
6 changes: 6 additions & 0 deletions src/vue/components/block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export default {
xlargeInsetIos: Boolean,
xlargeInsetMd: Boolean,
strong: Boolean,
strongIos: Boolean,
strongMd: Boolean,
outline: Boolean,
outlineIos: Boolean,
outlineMd: Boolean,
Expand Down Expand Up @@ -68,6 +70,8 @@ export default {
xlargeInsetIos,
xlargeInsetMd,
strong,
strongIos,
strongMd,
outline,
outlineIos,
outlineMd,
Expand Down Expand Up @@ -99,6 +103,8 @@ export default {
'xlarge-inset-ios': xlargeInsetIos,
'xlarge-inset-md': xlargeInsetMd,
'block-strong': strong,
'block-strong-ios': strongIos,
'block-strong-md': strongMd,
'accordion-list': accordionList,
'accordion-opposite': accordionOpposite,
tabs,
Expand Down

0 comments on commit 75563ce

Please sign in to comment.