diff options
author | Volpeon <git@volpeon.ink> | 2024-10-17 16:45:00 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2024-10-17 16:45:00 +0200 |
commit | 50f6acc739f24bfa2ca080d08e90d82f8fa83543 (patch) | |
tree | 404dbe97d34b7e4fc3293c8e6a8c92d9941ac51e /src_old/scopes/_code.scss | |
parent | Colors (diff) | |
download | iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.tar.gz iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.tar.bz2 iro-design-50f6acc739f24bfa2ca080d08e90d82f8fa83543.zip |
Revamped variable management
Diffstat (limited to 'src_old/scopes/_code.scss')
-rw-r--r-- | src_old/scopes/_code.scss | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src_old/scopes/_code.scss b/src_old/scopes/_code.scss new file mode 100644 index 0000000..4df711b --- /dev/null +++ b/src_old/scopes/_code.scss | |||
@@ -0,0 +1,59 @@ | |||
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-i: fn.global-dim(--size --50), | ||
9 | --pad-b: fn.global-dim(--size --10), | ||
10 | --rounding: fn.global-dim(--rounding), | ||
11 | ), | ||
12 | --block: ( | ||
13 | --pad-i: fn.global-dim(--size --150), | ||
14 | --pad-b: fn.global-dim(--size --85), | ||
15 | --margin-bs: fn.global-dim(--paragraph --margin-bs), | ||
16 | --rounding: fn.global-dim(--rounding), | ||
17 | ) | ||
18 | ), | ||
19 | --colors: ( | ||
20 | --inline: ( | ||
21 | --fg: fn.global-color(--red --1200), | ||
22 | --bg: fn.global-color(--red --200), | ||
23 | ), | ||
24 | --block: ( | ||
25 | --fg: fn.global-color(--text), | ||
26 | --bg: fn.global-color(--base --50), | ||
27 | ) | ||
28 | ) | ||
29 | )); | ||
30 | |||
31 | @include iro.bem-scope(iro.props-namespace()) { | ||
32 | code { | ||
33 | padding-block: fn.dim(--inline --pad-b); | ||
34 | padding-inline: fn.dim(--inline --pad-i); | ||
35 | border-radius: fn.dim(--inline --rounding); | ||
36 | background-color: fn.color(--inline --bg); | ||
37 | color: fn.color(--inline --fg); | ||
38 | } | ||
39 | |||
40 | pre { | ||
41 | margin-block: fn.dim(--block --margin-bs) 0; | ||
42 | margin-inline: 0; | ||
43 | padding-block: fn.dim(--block --pad-b); | ||
44 | padding-inline: fn.dim(--block --pad-i); | ||
45 | border-radius: fn.dim(--block --rounding); | ||
46 | background-color: fn.color(--block --bg); | ||
47 | color: fn.color(--block --fg); | ||
48 | |||
49 | code { | ||
50 | display: inline-block; | ||
51 | margin-inline-end: fn.dim(--block --pad-i); | ||
52 | padding: 0; | ||
53 | border-radius: 0; | ||
54 | background-color: transparent; | ||
55 | color: currentColor; | ||
56 | } | ||
57 | } | ||
58 | } | ||
59 | } | ||