summaryrefslogtreecommitdiffstats
path: root/src/scopes/_code.scss
diff options
context:
space:
mode:
Diffstat (limited to 'src/scopes/_code.scss')
-rw-r--r--src/scopes/_code.scss39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/scopes/_code.scss b/src/scopes/_code.scss
new file mode 100644
index 0000000..0d8cdd0
--- /dev/null
+++ b/src/scopes/_code.scss
@@ -0,0 +1,39 @@
1@use 'sass:meta';
2@use 'iro-sass/src/iro-sass' as iro;
3@use '../props';
4
5@forward 'code.vars';
6@use 'code.vars' as vars;
7
8@mixin styles {
9 @include props.materialize(meta.module-variables('vars'));
10
11 @include iro.bem-scope('code') {
12 code {
13 padding-block: props.get(vars.$inline--pad-b);
14 padding-inline: props.get(vars.$inline--pad-i);
15 color: props.get(vars.$inline--fg);
16 background-color: props.get(vars.$inline--bg);
17 border-radius: props.get(vars.$inline--rounding);
18 }
19
20 pre {
21 padding-block: props.get(vars.$block--pad-b);
22 padding-inline: props.get(vars.$block--pad-i);
23 margin-block: props.get(vars.$block--margin-bs) 0;
24 margin-inline: 0;
25 color: props.get(vars.$block--fg);
26 background-color: props.get(vars.$block--bg);
27 border-radius: props.get(vars.$block--rounding);
28
29 code {
30 display: inline-block;
31 padding: 0;
32 margin-inline-end: props.get(vars.$block--pad-i);
33 color: currentColor;
34 background-color: transparent;
35 border-radius: 0;
36 }
37 }
38 }
39}