From 6b0fcac695aa7a5517f6f53cec50da493acc4582 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 22 Jun 2024 19:30:00 +0200 Subject: Update --- src/.old/objects/_badge.scss | 173 ---------------------------------------- src/.old/objects/_button.scss | 179 ------------------------------------------ src/.old/objects/_emoji.scss | 74 ----------------- src/.old/objects/_icon.scss | 26 ------ 4 files changed, 452 deletions(-) delete mode 100644 src/.old/objects/_badge.scss delete mode 100644 src/.old/objects/_button.scss delete mode 100644 src/.old/objects/_emoji.scss delete mode 100644 src/.old/objects/_icon.scss (limited to 'src/.old/objects') diff --git a/src/.old/objects/_badge.scss b/src/.old/objects/_badge.scss deleted file mode 100644 index 0f73382..0000000 --- a/src/.old/objects/_badge.scss +++ /dev/null @@ -1,173 +0,0 @@ -@use 'iro-sass/src/index' as iro; -@use '../functions' as fn; - -@include iro.props-namespace('badge') { - @include iro.props-store(( - --dims: ( - --pad-x: fn.px-to-em(4px), - --pad-y: 0, - --rounding: 3px, - --fixed-100: 1em, - --fixed-200: 1.5em, - - --200: ( - --pad-x: fn.px-to-em(6px), - --pad-y: fn.px-to-em(2px), - ), - --300: ( - --pad-x: fn.px-to-em(10px), - --pad-y: fn.px-to-em(6px), - ), - - --pill: ( - --pad-x: fn.px-to-em(9px), - - --200: ( - --pad-x: fn.px-to-em(10px), - ), - --300: ( - --pad-x: fn.px-to-em(16px), - ), - ), - ), - ), 'dims'); - - @include iro.props-store(( - --colors: ( - --bg: fn.global-color(--obj-hi), - --label: fn.global-color(--fg-lo), - --hover: ( - --bg: fn.global-color(--obj), - ), - --active: ( - --bg: fn.global-color(--obj-lo), - ), - --key-focus: ( - --border: fn.global-color(--focus --fill), - --shadow: fn.global-color(--focus --shadow), - ), - - --primary: ( - --bg: fn.global-color(--fg-lo), - --label: fn.global-color(--bg), - --hover: ( - --bg: fn.global-color(--fg), - ), - --active: ( - --bg: fn.global-color(--fg), - ), - ), - - --accent: ( - --bg: fn.global-color(--accent --primary --solid --bg), - --label: fn.global-color(--accent --primary --solid --fg), - --hover: ( - --bg: fn.global-color(--accent --primary --solid --obj), - ), - --active: ( - --bg: fn.global-color(--accent --primary --solid --obj-lo), - ), - ), - - --accent-quiet: ( - --bg: fn.global-color(--accent --primary --quiet --bg), - --label: fn.global-color(--accent --primary --quiet --fg), - --hover: ( - --bg: fn.global-color(--accent --primary --quiet --obj), - ), - --active: ( - --bg: fn.global-color(--accent --primary --quiet --obj-lo), - ), - ) - ), - ), 'colors'); - - @include iro.bem-object(iro.props-namespace()) { - display: inline-block; - margin-top: -.5em; - margin-bottom: -.5em; - padding: fn.dim(--pad-y) fn.dim(--pad-x); - border-radius: fn.dim(--rounding); - background-color: fn.color(--bg); - color: fn.color(--label); - line-height: fn.global-dim(--font --standard --line-height); - text-align: center; - text-decoration: none; - - &:link, - &:visited, - &:enabled { - &:hover { - background-color: fn.color(--hover --bg); - } - - &:active { - background-color: fn.color(--active --bg); - } - } - - @each $variant in 'primary' 'accent' 'accent-quiet' { - @include iro.bem-modifier($variant) { - background-color: fn.color(--#{$variant} --bg); - color: fn.color(--#{$variant} --label); - - &:link, - &:visited, - &:enabled { - &:hover { - background-color: fn.color(--#{$variant} --hover --bg); - } - - &:active { - background-color: fn.color(--#{$variant} --active --bg); - } - } - } - } - - &:link, - &:visited, - &:enabled { - @include iro.bem-at-theme('keyboard') { - &:focus { - background-color: transparent; - box-shadow: inset 0 0 0 2px fn.color(--key-focus --border), fn.color(--key-focus --shadow); - color: currentColor; - } - } - } - - @include iro.bem-modifier('pill') { - padding-right: fn.dim(--pill --pad-x); - padding-left: fn.dim(--pill --pad-x); - border-radius: 10em; - } - - @each $size in '200' '300' { - @include iro.bem-modifier($size) { - padding: fn.dim(--#{$size} --pad-y) fn.dim(--#{$size} --pad-x); - - @include iro.bem-modifier('pill') { - padding-right: fn.dim(--pill --#{$size} --pad-x); - padding-left: fn.dim(--pill --#{$size} --pad-x); - } - } - } - - @include iro.bem-modifier('fixed-100') { - width: fn.dim(--fixed-100); - } - - @include iro.bem-modifier('fixed-200') { - width: fn.dim(--fixed-200); - } - - @include iro.bem-modifier('sm') { - font-size: fn.global-dim(--font-size --75); - } - - @include iro.bem-modifier('xs') { - font-size: fn.global-dim(--font-size --50); - } - } -} diff --git a/src/.old/objects/_button.scss b/src/.old/objects/_button.scss deleted file mode 100644 index 7cc24fa..0000000 --- a/src/.old/objects/_button.scss +++ /dev/null @@ -1,179 +0,0 @@ -@use 'iro-sass/src/index' as iro; -@use '../functions' as fn; - -@mixin button-variant($variant) { - &:link, - &:visited, - &:enabled { - border-color: fn.color(--#{$variant} --bg); - background-color: fn.color(--#{$variant} --bg); - box-shadow: fn.color(--#{$variant} --shadow); - color: fn.color(--#{$variant} --label); - } - - @include iro.bem-modifier('outline') { - &:link, - &:visited, - &:enabled { - background-color: transparent; - box-shadow: none; - color: fn.color(--#{$variant} --outline-label); - } - } - - &:link, - &:visited, - &:enabled { - &:hover { - border-color: fn.color(--#{$variant} --hover --bg); - background-color: fn.color(--#{$variant} --hover --bg); - box-shadow: fn.color(--#{$variant} --hover --shadow); - color: fn.color(--#{$variant} --hover --label); - } - - &:active { - border-color: fn.color(--#{$variant} --active --bg); - background-color: fn.color(--#{$variant} --active --bg); - box-shadow: fn.color(--#{$variant} --active --shadow); - color: fn.color(--#{$variant} --active --label); - } - } -} - -@include iro.props-namespace('button') { - @include iro.props-store(( - --dims: ( - --line-height: 1.4, - --pad-x: fn.global-dim(--size --225), - --pad-y: fn.global-dim(--size --65), - --rounding: 10em, - - --lg: ( - --pad-x: fn.global-dim(--size --300), - --pad-y: fn.global-dim(--size --100), - ), - ), - ), 'dims'); - - @include iro.props-store(( - --colors: ( - --any: ( - --disabled: ( - --bg: fn.global-color(--obj-hi), - --label: fn.global-color(--fg-hi3), - --shadow: 0 0 0 0 transparent, - ), - --key-focus: ( - --bg: transparent, - --label: fn.global-color(--focus --text), - --border: fn.global-color(--focus --fill), - --shadow: fn.global-color(--focus --shadow), - ), - ), - --accent: ( - --bg: fn.global-color(--accent --primary --solid --bg), - --label: fn.global-color(--accent --primary --solid --fg), - --outline-label: fn.global-color(--accent --primary --solid --obj), - --shadow: 0 0 0 0 transparent, - - --hover: ( - --bg: fn.global-color(--accent --primary --solid --obj), - --label: fn.global-color(--accent --primary --solid --fg), - --shadow: 0 0 0 0 transparent, - ), - --active: ( - --bg: fn.global-color(--accent --primary --solid --obj-lo), - --label: fn.global-color(--accent --primary --solid --fg), - --shadow: 0 0 0 0 transparent, - ), - ), - --primary: ( - --bg: fn.global-color(--fg), - --label: fn.global-color(--bg-hi2), - --outline-label: fn.global-color(--fg), - --shadow: 0 0 0 0 transparent, - - --hover: ( - --bg: fn.global-color(--fg-lo), - --label: fn.global-color(--bg-hi2), - --shadow: 0 0 0 0 transparent, - ), - --active: ( - --bg: fn.global-color(--fg-lo), - --label: fn.global-color(--bg-hi2), - --shadow: 0 0 0 0 transparent, - ), - ), - --secondary: ( - --bg: fn.global-color(--obj-hi), - --label: fn.global-color(--fg), - --outline-label: fn.global-color(--fg), - --shadow: 0 0 0 0 transparent, - - --hover: ( - --bg: fn.global-color(--obj), - --label: fn.global-color(--fg-lo), - --shadow: 0 0 0 0 transparent, - ), - --active: ( - --bg: fn.global-color(--obj-lo), - --label: fn.global-color(--fg-lo), - --shadow: 0 0 0 0 transparent, - ), - ), - ), - ), 'colors'); - - @include iro.bem-object(iro.props-namespace()) { - display: inline-block; - padding: fn.dim(--pad-y) fn.dim(--pad-x); - border: 2px solid transparent; - border-radius: fn.dim(--rounding); - border-color: fn.color(--any --disabled --bg); - background-color: fn.color(--any --disabled --bg); - box-shadow: fn.color(--any --disabled --shadow); - color: fn.color(--any --disabled --label); - font-weight: 500; - line-height: fn.dim(--line-height); - text-align: center; - text-decoration: none; - vertical-align: top; - - @include iro.bem-modifier('block') { - display: block; - } - - @include iro.bem-modifier('outline') { - background-color: transparent; - box-shadow: none; - } - - @include iro.bem-modifier('lg') { - padding: fn.dim(--lg --pad-y) fn.dim(--lg --pad-x); - } - - @include button-variant('secondary'); - - @each $mod in 'accent' 'primary' { - @include iro.bem-modifier($mod) { - @include button-variant($mod); - } - } - - @include iro.bem-at-theme('keyboard') { - &:focus { - border-color: fn.color(--any --key-focus --border); - background-color: fn.color(--any --key-focus --bg); - box-shadow: fn.color(--any --key-focus --shadow); - color: fn.color(--any --key-focus --label); - } - } - - @include iro.bem-modifier('round') { - width: calc(1em * fn.dim(--line-height) + 2 * fn.dim(--pad-y)); - padding-right: 0; - padding-left: 0; - border-radius: 100em; - } - } -} diff --git a/src/.old/objects/_emoji.scss b/src/.old/objects/_emoji.scss deleted file mode 100644 index 8d17212..0000000 --- a/src/.old/objects/_emoji.scss +++ /dev/null @@ -1,74 +0,0 @@ -@use 'iro-sass/src/index' as iro; -@use '../functions' as fn; -@use 'sass:math'; - -@include iro.props-namespace('emoji') { - @include iro.props-store(( - --dims: ( - --size: calc(1 / 14 * 18em), - --pad: .3em, - --rounding: 3px, - --zoom: 3, - --valign: -.25em, - - --125: ( - --size: calc(1 / 14 * 23em), - --valign: -.45em, - ), - - --150: ( - --size: calc(1 / 14 * 28em), - --valign: -.65em, - ), - - --200: ( - --size: calc(1 / 14 * 38em), - --valign: -1em, - ) - ) - ), 'dims'); - - @include iro.props-store(( - --colors: ( - --bg: fn.global-color(--obj-hi), - ) - ), 'colors'); - - @include iro.bem-object(iro.props-namespace()) { - display: inline-block; - position: relative; - width: calc(fn.dim(--size)); - height: calc(fn.dim(--size)); - margin: calc(-1 * fn.dim(--pad)); - padding: calc(fn.dim(--pad)); - vertical-align: fn.dim(--valign); - object-fit: contain; - - @include iro.bem-modifier('icon') { - margin: calc(-1 * fn.dim(--pad) - .5 * (fn.dim(--size) - fn.foreign-dim(--icon, --size))); - vertical-align: fn.foreign-dim(--icon, --valign); - } - - @each $size in '125' '150' '200' { - @include iro.bem-modifier($size) { - width: fn.dim(--#{$size} --size); - height: fn.dim(--#{$size} --size); - vertical-align: fn.dim(--#{$size} --valign); - - @include iro.bem-modifier('icon') { - margin: calc(-1 * fn.dim(--pad) - .5 * (fn.dim(--#{$size} --size) - fn.foreign-dim(--icon, --size))); - } - } - } - - @include iro.bem-modifier('zoomable') { - transition: transform .2s ease, background-color .2s ease; - border-radius: calc(fn.dim(--rounding) / fn.dim(--zoom)); - - &:hover { - transform: scale(fn.dim(--zoom)); - background-color: fn.color(--bg); - } - } - } -} diff --git a/src/.old/objects/_icon.scss b/src/.old/objects/_icon.scss deleted file mode 100644 index 5c4bfab..0000000 --- a/src/.old/objects/_icon.scss +++ /dev/null @@ -1,26 +0,0 @@ -@use 'iro-sass/src/index' as iro; -@use '../functions' as fn; - -@include iro.props-namespace('icon') { - @include iro.props-store(( - --dims: ( - --stroke: 1.5px, - --size: calc(1 / 14 * 16em), - --valign: -.2em, - ) - ), 'dims'); - - @include iro.bem-object(iro.props-namespace()) { - display: inline; - width: fn.dim(--size); - height: fn.dim(--size); - stroke-width: fn.dim(--stroke); - stroke-linecap: round; - stroke-linejoin: round; - vertical-align: fn.dim(--valign); - - @include iro.bem-modifier('block') { - display: block; - } - } -} -- cgit v1.2.3-70-g09d2