summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_apply-vars.scss50
-rw-r--r--src/_base.scss (renamed from src/_general.scss)0
-rw-r--r--src/index.scss84
-rw-r--r--src/layouts/_form.scss2
-rw-r--r--src/objects/_checkbox.scss2
-rw-r--r--src/objects/_radio.scss2
-rw-r--r--src/objects/_switch.scss2
7 files changed, 74 insertions, 68 deletions
diff --git a/src/_apply-vars.scss b/src/_apply-vars.scss
new file mode 100644
index 0000000..cf4c940
--- /dev/null
+++ b/src/_apply-vars.scss
@@ -0,0 +1,50 @@
1@use 'iro-sass/src/index' as iro;
2@use 'include-media/dist/include-media' as media;
3
4:root {
5 @include iro.props-assign('dims');
6
7 @each $breakpoint in map-keys(media.$breakpoints) {
8 @include media.media('<=#{$breakpoint}') {
9 @include iro.props-assign($breakpoint);
10 }
11 }
12
13 @include iro.props-assign('colors');
14 @include iro.props-assign('palette-light');
15
16 @media (prefers-color-scheme: dark) {
17 @include iro.props-assign('palette-dark');
18 }
19}
20
21@include iro.bem-theme('raised') {
22 @include iro.props-assign('colors');
23 @include iro.props-assign('palette-light-raised');
24
25 @media (prefers-color-scheme: dark) {
26 @include iro.props-assign('palette-dark-raised');
27 }
28}
29
30@include iro.bem-theme('grayscale') {
31 @include iro.props-assign('colors', $root: --colors --grayscale-accent, $prefix: --colors --accent);
32}
33
34/*@media (prefers-color-scheme: dark) {
35 @include iro.props-assign('dark');
36 @include iro.props-assign('dark-palette');
37
38 @include iro.bem-theme('grayscale') {
39 @include iro.props-assign('dark', $root: --colors --grayscale-accent, $prefix: --colors --accent);
40 }
41
42 @include iro.bem-theme('raised') {
43 @include iro.props-assign('dark-raised-palette');
44 @include iro.props-assign('dark');
45
46 @include iro.bem-multi('at-theme' 'grayscale', 'theme' 'grayscale') {
47 @include iro.props-assign('dark', $root: --colors --grayscale-accent, $prefix: --colors --accent);
48 }
49 }
50}*/
diff --git a/src/_general.scss b/src/_base.scss
index 54df879..54df879 100644
--- a/src/_general.scss
+++ b/src/_base.scss
diff --git a/src/index.scss b/src/index.scss
index 813764c..24b8d72 100644
--- a/src/index.scss
+++ b/src/index.scss
@@ -1,71 +1,25 @@
1@use 'iro-sass/src/index' as iro; 1@use 'functions';
2@use 'include-media/dist/include-media' as media;
3 2
4@import 'vars'; 3@use 'vars';
5@import 'general';
6 4
7@import 'layouts/card'; 5@use 'base';
8@import 'layouts/container';
9 6
10@import 'objects/icon'; 7@use 'layouts/card';
11@import 'objects/heading'; 8@use 'layouts/container';
12@import 'objects/rule';
13@import 'objects/button';
14@import 'objects/text-field';
15@import 'objects/field-label';
16@import 'objects/radio';
17@import 'objects/checkbox';
18@import 'objects/switch';
19@import 'objects/action-button';
20@import 'objects/status-indicator';
21@import 'objects/avatar';
22 9
23@import 'layouts/form'; 10@use 'objects/icon';
11@use 'objects/heading';
12@use 'objects/rule';
13@use 'objects/button';
14@use 'objects/text-field';
15@use 'objects/field-label';
16@use 'objects/radio';
17@use 'objects/checkbox';
18@use 'objects/switch';
19@use 'objects/action-button';
20@use 'objects/status-indicator';
21@use 'objects/avatar';
24 22
25:root { 23@use 'layouts/form';
26 @include iro.props-assign('dims');
27 24
28 @each $breakpoint in map-keys(media.$breakpoints) { 25@use 'apply-vars';
29 @include media.media('<=#{$breakpoint}') {
30 @include iro.props-assign($breakpoint);
31 }
32 }
33
34 @include iro.props-assign('colors');
35 @include iro.props-assign('palette-light');
36
37 @media (prefers-color-scheme: dark) {
38 @include iro.props-assign('palette-dark');
39 }
40}
41
42@include iro.bem-theme('raised') {
43 @include iro.props-assign('colors');
44 @include iro.props-assign('palette-light-raised');
45
46 @media (prefers-color-scheme: dark) {
47 @include iro.props-assign('palette-dark-raised');
48 }
49}
50
51@include iro.bem-theme('grayscale') {
52 @include iro.props-assign('colors', $root: --colors --grayscale-accent, $prefix: --colors --accent);
53}
54
55/*@media (prefers-color-scheme: dark) {
56 @include iro.props-assign('dark');
57 @include iro.props-assign('dark-palette');
58
59 @include iro.bem-theme('grayscale') {
60 @include iro.props-assign('dark', $root: --colors --grayscale-accent, $prefix: --colors --accent);
61 }
62
63 @include iro.bem-theme('raised') {
64 @include iro.props-assign('dark-raised-palette');
65 @include iro.props-assign('dark');
66
67 @include iro.bem-multi('at-theme' 'grayscale', 'theme' 'grayscale') {
68 @include iro.props-assign('dark', $root: --colors --grayscale-accent, $prefix: --colors --accent);
69 }
70 }
71}*/
diff --git a/src/layouts/_form.scss b/src/layouts/_form.scss
index aa4a166..7225807 100644
--- a/src/layouts/_form.scss
+++ b/src/layouts/_form.scss
@@ -11,6 +11,8 @@
11 ), 'dims'); 11 ), 'dims');
12 12
13 @include iro.bem-layout(iro.props-namespace()) { 13 @include iro.bem-layout(iro.props-namespace()) {
14 @include iro.bem-composed-of('field-label' 'object');
15
14 display: flex; 16 display: flex;
15 flex-direction: column; 17 flex-direction: column;
16 align-items: baseline; 18 align-items: baseline;
diff --git a/src/objects/_checkbox.scss b/src/objects/_checkbox.scss
index 5ea2e4a..efc85d6 100644
--- a/src/objects/_checkbox.scss
+++ b/src/objects/_checkbox.scss
@@ -4,7 +4,7 @@
4@include iro.props-namespace('checkbox') { 4@include iro.props-namespace('checkbox') {
5 @include iro.props-store(( 5 @include iro.props-store((
6 --dims: ( 6 --dims: (
7 --size: iro.fn-px-to-rem(13px), 7 --size: iro.fn-px-to-rem(14px),
8 --label-gap: .6rem, 8 --label-gap: .6rem,
9 --border-width: fn.global-dim(--border-width --medium), 9 --border-width: fn.global-dim(--border-width --medium),
10 --pad-x: .3rem, 10 --pad-x: .3rem,
diff --git a/src/objects/_radio.scss b/src/objects/_radio.scss
index 442034b..46f2a2a 100644
--- a/src/objects/_radio.scss
+++ b/src/objects/_radio.scss
@@ -4,7 +4,7 @@
4@include iro.props-namespace('radio') { 4@include iro.props-namespace('radio') {
5 @include iro.props-store(( 5 @include iro.props-store((
6 --dims: ( 6 --dims: (
7 --diameter: iro.fn-px-to-rem(14px), 7 --diameter: iro.fn-px-to-rem(15px),
8 --label-gap: .6rem, 8 --label-gap: .6rem,
9 --border-width: fn.global-dim(--border-width --medium), 9 --border-width: fn.global-dim(--border-width --medium),
10 --pad-x: .3rem, 10 --pad-x: .3rem,
diff --git a/src/objects/_switch.scss b/src/objects/_switch.scss
index 9911b73..59e4c55 100644
--- a/src/objects/_switch.scss
+++ b/src/objects/_switch.scss
@@ -5,7 +5,7 @@
5 @include iro.props-store(( 5 @include iro.props-store((
6 --dims: ( 6 --dims: (
7 --width: iro.fn-px-to-rem(26px), 7 --width: iro.fn-px-to-rem(26px),
8 --height: iro.fn-px-to-rem(14px), 8 --height: iro.fn-px-to-rem(15px),
9 --label-gap: .6rem, 9 --label-gap: .6rem,
10 --border-width: fn.global-dim(--border-width --medium), 10 --border-width: fn.global-dim(--border-width --medium),
11 --pad-x: .3rem, 11 --pad-x: .3rem,