From 48cb00040763459fc46d4aa108bf72c12f48f422 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 21 Jun 2024 23:07:50 +0200 Subject: WIP: Refactoring --- src/.old/scopes/_lists.scss | 67 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/.old/scopes/_lists.scss (limited to 'src/.old/scopes/_lists.scss') diff --git a/src/.old/scopes/_lists.scss b/src/.old/scopes/_lists.scss new file mode 100644 index 0000000..1322f2d --- /dev/null +++ b/src/.old/scopes/_lists.scss @@ -0,0 +1,67 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('lists') { + @include iro.props-store(( + --dims: ( + --indent: calc(fn.global-dim(--list --indent) + 1em), + --margin-top: fn.global-dim(--paragraph --margin-top), + + --compact: ( + --indent: fn.global-dim(--list --compact-indent), + ), + ) + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --border: fn.global-color(--obj-hi), + ) + ), 'colors'); + + @include iro.bem-scope(iro.props-namespace()) { + ul, + ol { + margin-top: fn.dim(--margin-top); + padding-left: fn.dim(--indent); + + ul, + ol { + margin-top: 0; + } + } + + ul { + list-style: disc; + } + + ol { + list-style: decimal; + } + + dl { + margin: fn.dim(--margin-top) 0 0; + padding: 0; + } + + dt { + color: fn.global-color(--fg-lo); + font-weight: bold; + } + + dd { + margin: 0 0 0 fn.dim(--indent); + } + + @include iro.bem-modifier('compact') { + ul, + ol { + padding-left: calc(fn.dim(--compact --indent) - 3px); + } + + dd { + margin-left: calc(fn.dim(--compact --indent) - 3px); + } + } + } +} -- cgit v1.2.3-70-g09d2