diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/_iro-design.scss | 1 | ||||
-rw-r--r-- | src/_layers.scss | 3 | ||||
-rw-r--r-- | src/objects/_card.scss | 2 | ||||
-rw-r--r-- | src/objects/_tabbar.scss | 58 |
4 files changed, 45 insertions, 19 deletions
diff --git a/src/_iro-design.scss b/src/_iro-design.scss index 2010a2d..04857e3 100644 --- a/src/_iro-design.scss +++ b/src/_iro-design.scss | |||
@@ -23,6 +23,7 @@ $breakpoints: ( | |||
23 | @forward 'config' as config--*; | 23 | @forward 'config' as config--*; |
24 | @forward 'props' as props--*; | 24 | @forward 'props' as props--*; |
25 | @forward 'core' as core--*; | 25 | @forward 'core' as core--*; |
26 | @forward 'layers' as layers--*; | ||
26 | 27 | ||
27 | @forward 'layouts/button-group' as l-button-group--*; | 28 | @forward 'layouts/button-group' as l-button-group--*; |
28 | @forward 'layouts/card-list' as l-card-list--*; | 29 | @forward 'layouts/card-list' as l-card-list--*; |
diff --git a/src/_layers.scss b/src/_layers.scss new file mode 100644 index 0000000..cc3bb50 --- /dev/null +++ b/src/_layers.scss | |||
@@ -0,0 +1,3 @@ | |||
1 | @mixin styles { | ||
2 | @layer scope, theme, object, layout, component, utility; | ||
3 | } | ||
diff --git a/src/objects/_card.scss b/src/objects/_card.scss index 6628eab..ff95526 100644 --- a/src/objects/_card.scss +++ b/src/objects/_card.scss | |||
@@ -14,7 +14,7 @@ | |||
14 | position: relative; | 14 | position: relative; |
15 | display: flex; | 15 | display: flex; |
16 | flex-direction: column; | 16 | flex-direction: column; |
17 | margin-inline: calc(-1 * props.get(vars.$key-focus--border-width)); | 17 | margin: calc(-1 * props.get(vars.$key-focus--border-width)); |
18 | background-color: props.get(vars.$bg-color); | 18 | background-color: props.get(vars.$bg-color); |
19 | background-clip: content-box; | 19 | background-clip: content-box; |
20 | border: props.get(vars.$key-focus--border-offset) solid transparent; | 20 | border: props.get(vars.$key-focus--border-offset) solid transparent; |
diff --git a/src/objects/_tabbar.scss b/src/objects/_tabbar.scss index 218fe7d..aaa6f07 100644 --- a/src/objects/_tabbar.scss +++ b/src/objects/_tabbar.scss | |||
@@ -14,15 +14,20 @@ | |||
14 | @include bem.object('tabbar') { | 14 | @include bem.object('tabbar') { |
15 | min-inline-size: 0; | 15 | min-inline-size: 0; |
16 | block-size: props.get(vars.$block-size); | 16 | block-size: props.get(vars.$block-size); |
17 | overflow-inline: auto; | 17 | |
18 | box-shadow: 0 calc(-1 * props.get(vars.$indicator--width)) 0 0 props.get(vars.$railing--bg-color) inset; | 18 | &::after { |
19 | display: block; | ||
20 | block-size: props.get(vars.$indicator--width); | ||
21 | margin-block-start: calc(-1 * props.get(vars.$indicator--width)); | ||
22 | content: ''; | ||
23 | background-color: props.get(vars.$railing--bg-color); | ||
24 | } | ||
19 | 25 | ||
20 | @include bem.elem('tabs') { | 26 | @include bem.elem('tabs') { |
21 | display: flex; | 27 | display: flex; |
22 | gap: props.get(vars.$spacing); | 28 | block-size: 100%; |
23 | block-size: 100%; | 29 | margin-inline: calc(-.5 * props.get(vars.$spacing)); |
24 | padding-inline: calc(.5 * props.get(vars.$spacing)); | 30 | overflow-inline: auto; |
25 | margin-inline: calc(-.5 * props.get(vars.$spacing)); | ||
26 | } | 31 | } |
27 | 32 | ||
28 | @include bem.modifier('quiet') { | 33 | @include bem.modifier('quiet') { |
@@ -34,17 +39,17 @@ | |||
34 | } | 39 | } |
35 | 40 | ||
36 | @include bem.elem('tab') { | 41 | @include bem.elem('tab') { |
37 | position: relative; | 42 | position: relative; |
38 | display: flex; | 43 | display: flex; |
39 | align-items: center; | 44 | align-items: center; |
40 | color: props.get(vars.$tab--text-color); | 45 | padding-inline: calc(.5 * props.get(vars.$spacing)); |
41 | white-space: nowrap; | 46 | color: props.get(vars.$tab--text-color); |
42 | border-block: props.get(vars.$indicator--width) solid transparent; | 47 | white-space: nowrap; |
43 | 48 | ||
44 | &::before { | 49 | &::before { |
45 | position: absolute; | 50 | position: absolute; |
46 | inset-block-start: 50%; | 51 | inset-block-start: 50%; |
47 | inset-inline: calc(-1 * props.get(vars.$tab--pad-i)); | 52 | inset-inline: calc(-1 * props.get(vars.$tab--pad-i) + .5 * props.get(vars.$spacing)); |
48 | z-index: -10; | 53 | z-index: -10; |
49 | block-size: 1.5em; | 54 | block-size: 1.5em; |
50 | content: ''; | 55 | content: ''; |
@@ -52,6 +57,17 @@ | |||
52 | transform: translateY(-50%); | 57 | transform: translateY(-50%); |
53 | } | 58 | } |
54 | 59 | ||
60 | &::after { | ||
61 | position: absolute; | ||
62 | inset-block-end: 0; | ||
63 | inset-inline: calc(.5 * props.get(vars.$spacing)); | ||
64 | z-index: 10; | ||
65 | display: none; | ||
66 | block-size: props.get(vars.$indicator--width); | ||
67 | content: ''; | ||
68 | background-color: props.get(vars.$tab--selected--text-color); | ||
69 | } | ||
70 | |||
55 | &:link, | 71 | &:link, |
56 | &:visited { | 72 | &:visited { |
57 | &:hover, | 73 | &:hover, |
@@ -73,16 +89,22 @@ | |||
73 | } | 89 | } |
74 | 90 | ||
75 | @include bem.is('selected') { | 91 | @include bem.is('selected') { |
76 | color: props.get(vars.$tab--selected--text-color); | 92 | color: props.get(vars.$tab--selected--text-color); |
77 | border-block-end-color: props.get(vars.$tab--selected--text-color); | 93 | |
94 | &::after { | ||
95 | display: block; | ||
96 | } | ||
78 | } | 97 | } |
79 | } | 98 | } |
80 | 99 | ||
81 | @include bem.modifier('accent') { | 100 | @include bem.modifier('accent') { |
82 | @include bem.elem('tab') { | 101 | @include bem.elem('tab') { |
102 | &::after { | ||
103 | background-color: props.get(vars.$tab--accent--text-color); | ||
104 | } | ||
105 | |||
83 | @include bem.is('selected') { | 106 | @include bem.is('selected') { |
84 | color: props.get(vars.$tab--accent--text-color); | 107 | color: props.get(vars.$tab--accent--text-color); |
85 | border-block-end-color: props.get(vars.$tab--accent--text-color); | ||
86 | } | 108 | } |
87 | } | 109 | } |
88 | } | 110 | } |