diff options
| author | Volpeon <git@volpeon.ink> | 2022-03-25 18:29:21 +0100 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-03-25 18:29:21 +0100 |
| commit | 5e2696d9ae35b37a9f7d0fe1c52b93fb84570464 (patch) | |
| tree | e3b22a889bd4f8a6679d76dbe85c3152173947a6 /src_demo | |
| parent | Fixed vertical rule (diff) | |
| download | iro-design-5e2696d9ae35b37a9f7d0fe1c52b93fb84570464.tar.gz iro-design-5e2696d9ae35b37a9f7d0fe1c52b93fb84570464.tar.bz2 iro-design-5e2696d9ae35b37a9f7d0fe1c52b93fb84570464.zip | |
Split demo in :target views
Diffstat (limited to 'src_demo')
| -rw-r--r-- | src_demo/_base.scss | 5 | ||||
| -rw-r--r-- | src_demo/components/_box.scss | 16 | ||||
| -rw-r--r-- | src_demo/components/_content.scss | 7 | ||||
| -rw-r--r-- | src_demo/components/_sidebar.scss | 29 | ||||
| -rw-r--r-- | src_demo/components/_view.scss | 12 | ||||
| -rw-r--r-- | src_demo/index.scss | 17 |
6 files changed, 86 insertions, 0 deletions
diff --git a/src_demo/_base.scss b/src_demo/_base.scss new file mode 100644 index 0000000..8dcd789 --- /dev/null +++ b/src_demo/_base.scss | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | body { | ||
| 2 | display: grid; | ||
| 3 | grid-template-columns: auto 1fr; | ||
| 4 | grid-template-areas: 'sidebar content'; | ||
| 5 | } | ||
diff --git a/src_demo/components/_box.scss b/src_demo/components/_box.scss new file mode 100644 index 0000000..e983f2c --- /dev/null +++ b/src_demo/components/_box.scss | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | ||
| 2 | @use '../../src/functions' as fn; | ||
| 3 | |||
| 4 | @include iro.props-namespace('box') { | ||
| 5 | @include iro.props-store(( | ||
| 6 | --colors: ( | ||
| 7 | --border: fn.global-color(--obj), | ||
| 8 | ), | ||
| 9 | ), 'colors'); | ||
| 10 | |||
| 11 | @include iro.bem-component(iro.props-namespace()) { | ||
| 12 | margin: 2em 0; | ||
| 13 | padding: 2em; | ||
| 14 | border: 1px solid fn.color(--border); | ||
| 15 | } | ||
| 16 | } | ||
diff --git a/src_demo/components/_content.scss b/src_demo/components/_content.scss new file mode 100644 index 0000000..6045e4b --- /dev/null +++ b/src_demo/components/_content.scss | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | ||
| 2 | |||
| 3 | @include iro.props-namespace('content') { | ||
| 4 | @include iro.bem-component(iro.props-namespace()) { | ||
| 5 | grid-area: content; | ||
| 6 | } | ||
| 7 | } | ||
diff --git a/src_demo/components/_sidebar.scss b/src_demo/components/_sidebar.scss new file mode 100644 index 0000000..9cff3c8 --- /dev/null +++ b/src_demo/components/_sidebar.scss | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | ||
| 2 | @use '../../src/functions' as fn; | ||
| 3 | |||
| 4 | @include iro.props-namespace('sidebar') { | ||
| 5 | @include iro.props-store(( | ||
| 6 | --colors: ( | ||
| 7 | --bg: fn.global-color(--bg), | ||
| 8 | --border: fn.global-color(--obj), | ||
| 9 | --icon: fn.global-color(--fg-hi), | ||
| 10 | --group-header-fg: fn.global-color(--fg-hi), | ||
| 11 | ), | ||
| 12 | ), 'colors'); | ||
| 13 | |||
| 14 | @include iro.props-store(( | ||
| 15 | --colors: ( | ||
| 16 | --bg: fn.global-color(--bg-hi), | ||
| 17 | --border: fn.global-color(--bg-hi), | ||
| 18 | ), | ||
| 19 | ), 'colors-dark'); | ||
| 20 | |||
| 21 | @include iro.bem-component(iro.props-namespace()) { | ||
| 22 | grid-area: sidebar; | ||
| 23 | min-width: 10em; | ||
| 24 | padding: .6em; | ||
| 25 | overflow: auto; | ||
| 26 | border-right: 1px solid fn.color(--border); | ||
| 27 | background-color: fn.color(--bg); | ||
| 28 | } | ||
| 29 | } | ||
diff --git a/src_demo/components/_view.scss b/src_demo/components/_view.scss new file mode 100644 index 0000000..8086280 --- /dev/null +++ b/src_demo/components/_view.scss | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | ||
| 2 | @use '../../src/functions' as fn; | ||
| 3 | |||
| 4 | @include iro.props-namespace('view') { | ||
| 5 | @include iro.bem-component(iro.props-namespace()) { | ||
| 6 | display: none; | ||
| 7 | |||
| 8 | &:target { | ||
| 9 | display: block; | ||
| 10 | } | ||
| 11 | } | ||
| 12 | } | ||
diff --git a/src_demo/index.scss b/src_demo/index.scss new file mode 100644 index 0000000..2a442bd --- /dev/null +++ b/src_demo/index.scss | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | @use '../src/declare-vars'; | ||
| 2 | |||
| 3 | @use '../src/base'; | ||
| 4 | @use 'base' as demo-base; | ||
| 5 | |||
| 6 | @use 'components/sidebar'; | ||
| 7 | @use 'components/content'; | ||
| 8 | @use 'components/box'; | ||
| 9 | @use 'components/view'; | ||
| 10 | |||
| 11 | @use '../src/layouts'; | ||
| 12 | @use '../src/objects'; | ||
| 13 | @use '../src/scopes'; | ||
| 14 | @use '../src/utils'; | ||
| 15 | |||
| 16 | @use '../src/apply-vars'; | ||
| 17 | |||
