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/_code.scss | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/.old/scopes/_code.scss (limited to 'src/.old/scopes/_code.scss') diff --git a/src/.old/scopes/_code.scss b/src/.old/scopes/_code.scss new file mode 100644 index 0000000..4eb9458 --- /dev/null +++ b/src/.old/scopes/_code.scss @@ -0,0 +1,68 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('code') { + @include iro.props-store(( + --dims: ( + --inline: ( + --pad-x: fn.global-dim(--size --50), + --pad-y: fn.global-dim(--size --10), + --rounding: 3px, + ), + --block: ( + --pad-x: fn.global-dim(--size --150), + --pad-y: fn.global-dim(--size --85), + --margin-top: fn.global-dim(--paragraph --margin-top), + --rounding: 3px, + ) + ) + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --inline: ( + --fg: fn.global-color(--red --quiet --fg), + --bg: fn.global-color(--red --quiet --bg), + ), + --block: ( + --fg: fn.global-color(--fg), + --bg: fn.global-color(--bg-hi2), + ) + ) + ), 'colors'); + + @include iro.props-store(( + --colors: ( + --block: ( + --fg: fn.global-color(--fg-lo), + --bg: fn.global-color(--obj-hi), + ) + ) + ), 'palette-light-hi'); + + @include iro.bem-scope(iro.props-namespace()) { + code { + padding: fn.dim(--inline --pad-y) fn.dim(--inline --pad-x); + border-radius: fn.dim(--inline --rounding); + background-color: fn.color(--inline --bg); + color: fn.color(--inline --fg); + } + + pre { + margin: fn.dim(--block --margin-top) 0 0 0; + padding: fn.dim(--block --pad-y) fn.dim(--block --pad-x); + border-radius: fn.dim(--block --rounding); + background-color: fn.color(--block --bg); + color: fn.color(--block --fg); + + code { + display: inline-block; + margin-right: fn.dim(--block --pad-x); + padding: 0; + border-radius: 0; + background-color: transparent; + color: currentColor; + } + } + } +} -- cgit v1.2.3-70-g09d2