diff options
author | Volpeon <git@volpeon.ink> | 2024-10-18 18:08:24 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-10-18 18:08:24 +0200 |
commit | 365c56edcc36b5b92902bac01ce44b43d01e8685 (patch) | |
tree | 644611792591a76e605068d0c9e230fad6a633e7 /src/scopes/_tables.scss | |
parent | Revamped variable management (diff) | |
download | iro-design-365c56edcc36b5b92902bac01ce44b43d01e8685.tar.gz iro-design-365c56edcc36b5b92902bac01ce44b43d01e8685.tar.bz2 iro-design-365c56edcc36b5b92902bac01ce44b43d01e8685.zip |
Refactoring
Diffstat (limited to 'src/scopes/_tables.scss')
-rw-r--r-- | src/scopes/_tables.scss | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/src/scopes/_tables.scss b/src/scopes/_tables.scss new file mode 100644 index 0000000..f722864 --- /dev/null +++ b/src/scopes/_tables.scss | |||
@@ -0,0 +1,104 @@ | |||
1 | @use 'sass:meta'; | ||
2 | @use 'iro-sass/src/iro-sass' as iro; | ||
3 | @use '../functions' as fn; | ||
4 | @use '../mixins' as mx; | ||
5 | |||
6 | @forward 'lists.vars'; | ||
7 | @use 'lists.vars' as vars; | ||
8 | |||
9 | @mixin styles { | ||
10 | @include props.materialize(meta.module-variables('vars')); | ||
11 | |||
12 | @include iro.bem-scope('tables') { | ||
13 | table { | ||
14 | margin-block-start: fn.dim(--margin-bs); | ||
15 | border-spacing: 0; | ||
16 | border-collapse: separate; | ||
17 | } | ||
18 | |||
19 | th { | ||
20 | @include mx.set-font(--standard, ( | ||
21 | --line-height: null, | ||
22 | --size: fn.global-dim(--font-size --50), | ||
23 | --weight: bold, | ||
24 | --transform: uppercase, | ||
25 | --spacing: .5px | ||
26 | )); | ||
27 | |||
28 | padding-block: fn.dim(--pad-b); | ||
29 | padding-inline: fn.dim(--pad-i); | ||
30 | color: fn.color(--heading); | ||
31 | text-align: start; | ||
32 | } | ||
33 | |||
34 | td { | ||
35 | padding-block: fn.dim(--pad-b); | ||
36 | padding-inline: fn.dim(--pad-i); | ||
37 | border-color: fn.color(--border); | ||
38 | border-style: solid; | ||
39 | border-width: 0; | ||
40 | border-block-start-width: fn.dim(--border); | ||
41 | } | ||
42 | |||
43 | tr { | ||
44 | &:last-child { | ||
45 | td { | ||
46 | border-block-end-width: fn.dim(--border); | ||
47 | } | ||
48 | } | ||
49 | } | ||
50 | |||
51 | @include iro.bem-modifier('flush') { | ||
52 | th, | ||
53 | td { | ||
54 | &:first-child { | ||
55 | padding-inline-start: 0; | ||
56 | } | ||
57 | |||
58 | &:last-child { | ||
59 | padding-inline-end: 0; | ||
60 | } | ||
61 | } | ||
62 | } | ||
63 | |||
64 | @include iro.bem-modifier('box') { | ||
65 | td { | ||
66 | background-color: fn.color(--box --bg); | ||
67 | |||
68 | &:first-child { | ||
69 | border-inline-start-width: fn.dim(--border); | ||
70 | } | ||
71 | |||
72 | &:last-child { | ||
73 | border-inline-end-width: fn.dim(--border); | ||
74 | } | ||
75 | } | ||
76 | |||
77 | tr { | ||
78 | &:first-child { | ||
79 | td { | ||
80 | &:first-child { | ||
81 | border-start-start-radius: fn.dim(--rounding); | ||
82 | } | ||
83 | |||
84 | &:last-child { | ||
85 | border-start-end-radius: fn.dim(--rounding); | ||
86 | } | ||
87 | } | ||
88 | } | ||
89 | |||
90 | &:last-child { | ||
91 | td { | ||
92 | &:first-child { | ||
93 | border-end-start-radius: fn.dim(--rounding); | ||
94 | } | ||
95 | |||
96 | &:last-child { | ||
97 | border-end-end-radius: fn.dim(--rounding); | ||
98 | } | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | } | ||