From 5e2696d9ae35b37a9f7d0fe1c52b93fb84570464 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 25 Mar 2022 18:29:21 +0100 Subject: Split demo in :target views --- src_demo/components/_box.scss | 16 ++++++++++++++++ src_demo/components/_content.scss | 7 +++++++ src_demo/components/_sidebar.scss | 29 +++++++++++++++++++++++++++++ src_demo/components/_view.scss | 12 ++++++++++++ 4 files changed, 64 insertions(+) create mode 100644 src_demo/components/_box.scss create mode 100644 src_demo/components/_content.scss create mode 100644 src_demo/components/_sidebar.scss create mode 100644 src_demo/components/_view.scss (limited to 'src_demo/components') 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 @@ +@use 'iro-sass/src/index' as iro; +@use '../../src/functions' as fn; + +@include iro.props-namespace('box') { + @include iro.props-store(( + --colors: ( + --border: fn.global-color(--obj), + ), + ), 'colors'); + + @include iro.bem-component(iro.props-namespace()) { + margin: 2em 0; + padding: 2em; + border: 1px solid fn.color(--border); + } +} 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 @@ +@use 'iro-sass/src/index' as iro; + +@include iro.props-namespace('content') { + @include iro.bem-component(iro.props-namespace()) { + grid-area: content; + } +} 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 @@ +@use 'iro-sass/src/index' as iro; +@use '../../src/functions' as fn; + +@include iro.props-namespace('sidebar') { + @include iro.props-store(( + --colors: ( + --bg: fn.global-color(--bg), + --border: fn.global-color(--obj), + --icon: fn.global-color(--fg-hi), + --group-header-fg: fn.global-color(--fg-hi), + ), + ), 'colors'); + + @include iro.props-store(( + --colors: ( + --bg: fn.global-color(--bg-hi), + --border: fn.global-color(--bg-hi), + ), + ), 'colors-dark'); + + @include iro.bem-component(iro.props-namespace()) { + grid-area: sidebar; + min-width: 10em; + padding: .6em; + overflow: auto; + border-right: 1px solid fn.color(--border); + background-color: fn.color(--bg); + } +} 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 @@ +@use 'iro-sass/src/index' as iro; +@use '../../src/functions' as fn; + +@include iro.props-namespace('view') { + @include iro.bem-component(iro.props-namespace()) { + display: none; + + &:target { + display: block; + } + } +} -- cgit v1.2.3-70-g09d2