summaryrefslogtreecommitdiffstats
path: root/src/.old/scopes
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2024-06-21 23:07:50 +0200
committerVolpeon <git@volpeon.ink>2024-06-21 23:07:50 +0200
commit48cb00040763459fc46d4aa108bf72c12f48f422 (patch)
tree9609470d56bb31d55697ef0c42f1c908804dd3f1 /src/.old/scopes
parentUpdate (diff)
downloadiro-design-48cb00040763459fc46d4aa108bf72c12f48f422.tar.gz
iro-design-48cb00040763459fc46d4aa108bf72c12f48f422.tar.bz2
iro-design-48cb00040763459fc46d4aa108bf72c12f48f422.zip
WIP: Refactoring
Diffstat (limited to 'src/.old/scopes')
-rw-r--r--src/.old/scopes/_blockquotes.scss35
-rw-r--r--src/.old/scopes/_code.scss68
-rw-r--r--src/.old/scopes/_lists.scss67
-rw-r--r--src/.old/scopes/_tables.scss114
4 files changed, 284 insertions, 0 deletions
diff --git a/src/.old/scopes/_blockquotes.scss b/src/.old/scopes/_blockquotes.scss
new file mode 100644
index 0000000..5383bd7
--- /dev/null
+++ b/src/.old/scopes/_blockquotes.scss
@@ -0,0 +1,35 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('blockquotes') {
5 @include iro.props-store((
6 --dims: (
7 --indent: fn.global-dim(--list --indent),
8 --margin-top: fn.global-dim(--paragraph --margin-top),
9
10 --compact: (
11 --indent: fn.global-dim(--list --compact-indent),
12 ),
13 )
14 ), 'dims');
15
16 @include iro.props-store((
17 --colors: (
18 --border: fn.global-color(--obj),
19 )
20 ), 'colors');
21
22 @include iro.bem-scope(iro.props-namespace()) {
23 blockquote {
24 margin: fn.dim(--margin-top) 0 0 1px;
25 padding-left: calc(fn.dim(--indent) - 3px);
26 border-left: 3px solid fn.color(--border);
27 }
28
29 @include iro.bem-modifier('compact') {
30 blockquote {
31 padding-left: calc(fn.dim(--compact --indent) - 3px);
32 }
33 }
34 }
35}
diff --git a/src/.old/scopes/_code.scss b/src/.old/scopes/_code.scss
new file mode 100644
index 0000000..4eb9458
--- /dev/null
+++ b/src/.old/scopes/_code.scss
@@ -0,0 +1,68 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('code') {
5 @include iro.props-store((
6 --dims: (
7 --inline: (
8 --pad-x: fn.global-dim(--size --50),
9 --pad-y: fn.global-dim(--size --10),
10 --rounding: 3px,
11 ),
12 --block: (
13 --pad-x: fn.global-dim(--size --150),
14 --pad-y: fn.global-dim(--size --85),
15 --margin-top: fn.global-dim(--paragraph --margin-top),
16 --rounding: 3px,
17 )
18 )
19 ), 'dims');
20
21 @include iro.props-store((
22 --colors: (
23 --inline: (
24 --fg: fn.global-color(--red --quiet --fg),
25 --bg: fn.global-color(--red --quiet --bg),
26 ),
27 --block: (
28 --fg: fn.global-color(--fg),
29 --bg: fn.global-color(--bg-hi2),
30 )
31 )
32 ), 'colors');
33
34 @include iro.props-store((
35 --colors: (
36 --block: (
37 --fg: fn.global-color(--fg-lo),
38 --bg: fn.global-color(--obj-hi),
39 )
40 )
41 ), 'palette-light-hi');
42
43 @include iro.bem-scope(iro.props-namespace()) {
44 code {
45 padding: fn.dim(--inline --pad-y) fn.dim(--inline --pad-x);
46 border-radius: fn.dim(--inline --rounding);
47 background-color: fn.color(--inline --bg);
48 color: fn.color(--inline --fg);
49 }
50
51 pre {
52 margin: fn.dim(--block --margin-top) 0 0 0;
53 padding: fn.dim(--block --pad-y) fn.dim(--block --pad-x);
54 border-radius: fn.dim(--block --rounding);
55 background-color: fn.color(--block --bg);
56 color: fn.color(--block --fg);
57
58 code {
59 display: inline-block;
60 margin-right: fn.dim(--block --pad-x);
61 padding: 0;
62 border-radius: 0;
63 background-color: transparent;
64 color: currentColor;
65 }
66 }
67 }
68}
diff --git a/src/.old/scopes/_lists.scss b/src/.old/scopes/_lists.scss
new file mode 100644
index 0000000..1322f2d
--- /dev/null
+++ b/src/.old/scopes/_lists.scss
@@ -0,0 +1,67 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3
4@include iro.props-namespace('lists') {
5 @include iro.props-store((
6 --dims: (
7 --indent: calc(fn.global-dim(--list --indent) + 1em),
8 --margin-top: fn.global-dim(--paragraph --margin-top),
9
10 --compact: (
11 --indent: fn.global-dim(--list --compact-indent),
12 ),
13 )
14 ), 'dims');
15
16 @include iro.props-store((
17 --colors: (
18 --border: fn.global-color(--obj-hi),
19 )
20 ), 'colors');
21
22 @include iro.bem-scope(iro.props-namespace()) {
23 ul,
24 ol {
25 margin-top: fn.dim(--margin-top);
26 padding-left: fn.dim(--indent);
27
28 ul,
29 ol {
30 margin-top: 0;
31 }
32 }
33
34 ul {
35 list-style: disc;
36 }
37
38 ol {
39 list-style: decimal;
40 }
41
42 dl {
43 margin: fn.dim(--margin-top) 0 0;
44 padding: 0;
45 }
46
47 dt {
48 color: fn.global-color(--fg-lo);
49 font-weight: bold;
50 }
51
52 dd {
53 margin: 0 0 0 fn.dim(--indent);
54 }
55
56 @include iro.bem-modifier('compact') {
57 ul,
58 ol {
59 padding-left: calc(fn.dim(--compact --indent) - 3px);
60 }
61
62 dd {
63 margin-left: calc(fn.dim(--compact --indent) - 3px);
64 }
65 }
66 }
67}
diff --git a/src/.old/scopes/_tables.scss b/src/.old/scopes/_tables.scss
new file mode 100644
index 0000000..f78e81b
--- /dev/null
+++ b/src/.old/scopes/_tables.scss
@@ -0,0 +1,114 @@
1@use 'iro-sass/src/index' as iro;
2@use '../functions' as fn;
3@use '../mixins' as mx;
4
5@include iro.props-namespace('tables') {
6 @include iro.props-store((
7 --dims: (
8 --pad-x: fn.global-dim(--size --175),
9 --pad-y: fn.global-dim(--size --125),
10 --rounding: 3px,
11 --margin-top: fn.global-dim(--paragraph --margin-top),
12 ),
13 ), 'dims');
14
15 @include iro.props-store((
16 --colors: (
17 --border: fn.global-color(--obj),
18 --heading: fn.global-color(--fg-hi),
19 --box: (
20 --bg: fn.global-color(--bg-hi2),
21 )
22 )
23 ), 'colors');
24
25 @include iro.bem-scope(iro.props-namespace()) {
26 table {
27 margin-top: fn.dim(--margin-top);
28 border-spacing: 0;
29 border-collapse: separate;
30 }
31
32 th {
33 @include mx.set-font(--standard, (
34 --line-height: null,
35 --size: fn.global-dim(--font-size --50),
36 --weight: 500,
37 --transform: uppercase,
38 --spacing: .5px
39 ));
40
41 padding: fn.dim(--pad-y) fn.dim(--pad-x);
42 color: fn.color(--heading);
43 text-align: left;
44 }
45
46 td {
47 padding: fn.dim(--pad-y) fn.dim(--pad-x);
48 border-width: 1px 0 0;
49 border-style: solid;
50 border-color: fn.color(--border);
51 }
52
53 tr {
54 &:last-child {
55 td {
56 border-bottom-width: 1px;
57 }
58 }
59 }
60
61 @include iro.bem-modifier('flush') {
62 th,
63 td {
64 &:first-child {
65 padding-left: 0;
66 }
67
68 &:last-child {
69 padding-right: 0;
70 }
71 }
72 }
73
74 @include iro.bem-modifier('box') {
75 td {
76 background-color: fn.color(--box --bg);
77
78 &:first-child {
79 border-left-width: 1px;
80 }
81
82 &:last-child {
83 border-right-width: 1px;
84 }
85 }
86
87 tr {
88 &:first-child {
89 td {
90 &:first-child {
91 border-top-left-radius: fn.dim(--rounding);
92 }
93
94 &:last-child {
95 border-top-right-radius: fn.dim(--rounding);
96 }
97 }
98 }
99
100 &:last-child {
101 td {
102 &:first-child {
103 border-bottom-left-radius: fn.dim(--rounding);
104 }
105
106 &:last-child {
107 border-bottom-right-radius: fn.dim(--rounding);
108 }
109 }
110 }
111 }
112 }
113 }
114}