From c93948dbc7790d1c36a7e36df4e5485ca249cc37 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 10 Jun 2022 21:13:39 +0200 Subject: Added code and blockquote styles, better headings, various other updates --- src/scopes/_blockquote.scss | 25 +++++++++++++++++++ src/scopes/_code.scss | 59 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 src/scopes/_blockquote.scss create mode 100644 src/scopes/_code.scss (limited to 'src/scopes') diff --git a/src/scopes/_blockquote.scss b/src/scopes/_blockquote.scss new file mode 100644 index 0000000..e997b9b --- /dev/null +++ b/src/scopes/_blockquote.scss @@ -0,0 +1,25 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('blockquote') { + @include iro.props-store(( + --dims: ( + --pad-x: fn.global-dim(--size --250), + --margin-top: fn.global-dim(--paragraph --margin-top), + ) + ), 'dims'); + + @include iro.props-store(( + --colors: ( + --border: fn.global-color(--obj-hi), + ) + ), 'colors'); + + @include iro.bem-scope(iro.props-namespace()) { + blockquote { + margin: fn.dim(--margin-top) 0 0 1px; + padding-left: calc(fn.dim(--pad-x) - 3px); + border-left: 3px solid fn.color(--border); + } + } +} diff --git a/src/scopes/_code.scss b/src/scopes/_code.scss new file mode 100644 index 0000000..d4b70ee --- /dev/null +++ b/src/scopes/_code.scss @@ -0,0 +1,59 @@ +@use 'iro-sass/src/index' as iro; +@use '../functions' as fn; + +@include iro.props-namespace('body') { + @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(--accent --primary --obj-lo), + --bg: fn.global-color(--accent --primary --faint), + ), + --block: ( + --fg: fn.global-color(--fg), + --bg: fn.global-color(--bg-hi), + ) + ) + ), 'colors'); + + @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