diff options
Diffstat (limited to 'src/objects')
| -rw-r--r-- | src/objects/_action-button.scss | 1 | ||||
| -rw-r--r-- | src/objects/_avatar.scss | 2 | ||||
| -rw-r--r-- | src/objects/_button.scss | 5 | ||||
| -rw-r--r-- | src/objects/_checkbox.scss | 4 | ||||
| -rw-r--r-- | src/objects/_heading.scss | 8 | ||||
| -rw-r--r-- | src/objects/_radio.scss | 8 | ||||
| -rw-r--r-- | src/objects/_switch.scss | 4 | ||||
| -rw-r--r-- | src/objects/_text-field.scss | 4 |
8 files changed, 15 insertions, 21 deletions
diff --git a/src/objects/_action-button.scss b/src/objects/_action-button.scss index 86c7089..19cf37b 100644 --- a/src/objects/_action-button.scss +++ b/src/objects/_action-button.scss | |||
| @@ -94,6 +94,7 @@ | |||
| 94 | @include iro.bem-object(iro.props-namespace()) { | 94 | @include iro.bem-object(iro.props-namespace()) { |
| 95 | display: inline-block; | 95 | display: inline-block; |
| 96 | padding: fn.dim(--pad-y) fn.dim(--pad-x); | 96 | padding: fn.dim(--pad-y) fn.dim(--pad-x); |
| 97 | overflow: hidden; | ||
| 97 | border: 1px solid fn.color(--border); | 98 | border: 1px solid fn.color(--border); |
| 98 | border-radius: fn.dim(--rounding); | 99 | border-radius: fn.dim(--rounding); |
| 99 | background-color: fn.color(--bg); | 100 | background-color: fn.color(--bg); |
diff --git a/src/objects/_avatar.scss b/src/objects/_avatar.scss index 3bdfddc..ca0d373 100644 --- a/src/objects/_avatar.scss +++ b/src/objects/_avatar.scss | |||
| @@ -52,6 +52,8 @@ | |||
| 52 | color: #fff; | 52 | color: #fff; |
| 53 | line-height: fn.dim(--size); | 53 | line-height: fn.dim(--size); |
| 54 | text-align: center; | 54 | text-align: center; |
| 55 | object-fit: cover; | ||
| 56 | object-position: center center; | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | @include iro.bem-modifier('circle') { | 59 | @include iro.bem-modifier('circle') { |
diff --git a/src/objects/_button.scss b/src/objects/_button.scss index f158176..6f69ee8 100644 --- a/src/objects/_button.scss +++ b/src/objects/_button.scss | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
| 2 | @use '../functions' as fn; | 2 | @use '../functions' as fn; |
| 3 | @use '../vars'; | ||
| 4 | @use '../mixins/typography'; | ||
| 5 | 3 | ||
| 6 | @mixin button-variant($variant) { | 4 | @mixin button-variant($variant) { |
| 7 | border-color: fn.color(--#{$variant} --bg); | 5 | border-color: fn.color(--#{$variant} --bg); |
| @@ -111,12 +109,11 @@ | |||
| 111 | ), 'colors'); | 109 | ), 'colors'); |
| 112 | 110 | ||
| 113 | @include iro.bem-object(iro.props-namespace()) { | 111 | @include iro.bem-object(iro.props-namespace()) { |
| 114 | @include typography.set-font(vars.$font--main, (weight: 500)); | ||
| 115 | |||
| 116 | display: inline-block; | 112 | display: inline-block; |
| 117 | padding: fn.dim(--pad-y) fn.dim(--pad-x); | 113 | padding: fn.dim(--pad-y) fn.dim(--pad-x); |
| 118 | border: 2px solid transparent; | 114 | border: 2px solid transparent; |
| 119 | border-radius: fn.dim(--rounding); | 115 | border-radius: fn.dim(--rounding); |
| 116 | font-weight: 500; | ||
| 120 | line-height: 1; | 117 | line-height: 1; |
| 121 | text-align: center; | 118 | text-align: center; |
| 122 | text-decoration: none; | 119 | text-decoration: none; |
diff --git a/src/objects/_checkbox.scss b/src/objects/_checkbox.scss index 3bda5e7..5ea2e4a 100644 --- a/src/objects/_checkbox.scss +++ b/src/objects/_checkbox.scss | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @include iro.props-namespace('checkbox') { | 4 | @include iro.props-namespace('checkbox') { |
| 5 | @include iro.props-store(( | 5 | @include iro.props-store(( |
| 6 | --dims: ( | 6 | --dims: ( |
| 7 | --size: iro.fn-px-to-rem(14px), | 7 | --size: iro.fn-px-to-rem(13px), |
| 8 | --label-gap: .6rem, | 8 | --label-gap: .6rem, |
| 9 | --border-width: fn.global-dim(--border-width --medium), | 9 | --border-width: fn.global-dim(--border-width --medium), |
| 10 | --pad-x: .3rem, | 10 | --pad-x: .3rem, |
| @@ -56,7 +56,7 @@ | |||
| 56 | flex: 0 0 auto; | 56 | flex: 0 0 auto; |
| 57 | width: fn.dim(--size); | 57 | width: fn.dim(--size); |
| 58 | height: fn.dim(--size); | 58 | height: fn.dim(--size); |
| 59 | margin-top: calc(.5 * ($line-height * 1em - fn.dim(--size))); | 59 | margin-top: calc(.5 * (fn.global-dim(--font --standard --line-height) * 1em - fn.dim(--size))); |
| 60 | border-radius: fn.dim(--border-width); | 60 | border-radius: fn.dim(--border-width); |
| 61 | background-color: fn.color(--box-border); | 61 | background-color: fn.color(--box-border); |
| 62 | 62 | ||
diff --git a/src/objects/_heading.scss b/src/objects/_heading.scss index 7d67a87..2af8e19 100644 --- a/src/objects/_heading.scss +++ b/src/objects/_heading.scss | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
| 2 | @use '../functions' as fn; | 2 | @use '../functions' as fn; |
| 3 | @use '../vars'; | ||
| 4 | @use '../mixins/typography'; | ||
| 5 | 3 | ||
| 6 | @include iro.props-namespace('heading') { | 4 | @include iro.props-namespace('heading') { |
| 7 | @include iro.props-store(( | 5 | @include iro.props-store(( |
| @@ -22,7 +20,7 @@ | |||
| 22 | ), 'colors'); | 20 | ), 'colors'); |
| 23 | 21 | ||
| 24 | @include iro.bem-object(iro.props-namespace()) { | 22 | @include iro.bem-object(iro.props-namespace()) { |
| 25 | @include typography.set-font(vars.$font--headline); | 23 | @include fn.set-font(--headline); |
| 26 | 24 | ||
| 27 | display: block; | 25 | display: block; |
| 28 | margin-top: fn.dim(--in-page-margin --top); | 26 | margin-top: fn.dim(--in-page-margin --top); |
| @@ -53,7 +51,7 @@ | |||
| 53 | } | 51 | } |
| 54 | 52 | ||
| 55 | @include iro.bem-modifier('sm') { | 53 | @include iro.bem-modifier('sm') { |
| 56 | @include typography.set-font($font--main, (line-height: map-get(vars.$font--headline, line-height))); | 54 | @include fn.set-font(--standard, (--line-height: fn.global-dim(--font --headline --line-height))); |
| 57 | 55 | ||
| 58 | color: fn.color(--strong); | 56 | color: fn.color(--strong); |
| 59 | font-size: fn.global-dim(--font-size --md); | 57 | font-size: fn.global-dim(--font-size --md); |
| @@ -61,7 +59,7 @@ | |||
| 61 | } | 59 | } |
| 62 | 60 | ||
| 63 | @include iro.bem-modifier('xs') { | 61 | @include iro.bem-modifier('xs') { |
| 64 | @include typography.set-font($font--main, (line-height: map-get(vars.$font--headline, line-height))); | 62 | @include fn.set-font(--standard, (--line-height: fn.global-dim(--font --headline --line-height))); |
| 65 | 63 | ||
| 66 | color: fn.color(--light); | 64 | color: fn.color(--light); |
| 67 | font-size: fn.global-dim(--font-size --xs); | 65 | font-size: fn.global-dim(--font-size --xs); |
diff --git a/src/objects/_radio.scss b/src/objects/_radio.scss index 26e8c31..442034b 100644 --- a/src/objects/_radio.scss +++ b/src/objects/_radio.scss | |||
| @@ -4,11 +4,11 @@ | |||
| 4 | @include iro.props-namespace('radio') { | 4 | @include iro.props-namespace('radio') { |
| 5 | @include iro.props-store(( | 5 | @include iro.props-store(( |
| 6 | --dims: ( | 6 | --dims: ( |
| 7 | --diameter: iro.fn-px-to-rem(15px), | 7 | --diameter: iro.fn-px-to-rem(14px), |
| 8 | --label-gap: .6rem, | 8 | --label-gap: .6rem, |
| 9 | --border-width: fn.global-dim(--border-width --medium), | 9 | --border-width: fn.global-dim(--border-width --medium), |
| 10 | --pad-x: .3rem, | 10 | --pad-x: .3rem, |
| 11 | --pad-y: .3rem, | 11 | --pad-y: .3rem, |
| 12 | --margin-right: fn.global-dim(--spacing --x --md), | 12 | --margin-right: fn.global-dim(--spacing --x --md), |
| 13 | ), | 13 | ), |
| 14 | ), 'dims'); | 14 | ), 'dims'); |
| @@ -57,7 +57,7 @@ | |||
| 57 | flex: 0 0 auto; | 57 | flex: 0 0 auto; |
| 58 | width: fn.dim(--diameter); | 58 | width: fn.dim(--diameter); |
| 59 | height: fn.dim(--diameter); | 59 | height: fn.dim(--diameter); |
| 60 | margin-top: calc(.5 * ($line-height * 1em - fn.dim(--diameter))); | 60 | margin-top: calc(.5 * (fn.global-dim(--font --standard --line-height) * 1em - fn.dim(--diameter))); |
| 61 | border-radius: 2em; | 61 | border-radius: 2em; |
| 62 | background-color: fn.color(--circle-border); | 62 | background-color: fn.color(--circle-border); |
| 63 | 63 | ||
diff --git a/src/objects/_switch.scss b/src/objects/_switch.scss index 2d70844..9911b73 100644 --- a/src/objects/_switch.scss +++ b/src/objects/_switch.scss | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | @include iro.props-store(( | 5 | @include iro.props-store(( |
| 6 | --dims: ( | 6 | --dims: ( |
| 7 | --width: iro.fn-px-to-rem(26px), | 7 | --width: iro.fn-px-to-rem(26px), |
| 8 | --height: iro.fn-px-to-rem(15px), | 8 | --height: iro.fn-px-to-rem(14px), |
| 9 | --label-gap: .6rem, | 9 | --label-gap: .6rem, |
| 10 | --border-width: fn.global-dim(--border-width --medium), | 10 | --border-width: fn.global-dim(--border-width --medium), |
| 11 | --pad-x: .3rem, | 11 | --pad-x: .3rem, |
| @@ -61,7 +61,7 @@ | |||
| 61 | flex: 0 0 auto; | 61 | flex: 0 0 auto; |
| 62 | width: fn.dim(--width); | 62 | width: fn.dim(--width); |
| 63 | height: fn.dim(--height); | 63 | height: fn.dim(--height); |
| 64 | margin-top: calc(.5 * ($line-height * 1em - fn.dim(--height))); | 64 | margin-top: calc(.5 * (fn.global-dim(--font --standard --line-height) * 1em - fn.dim(--height))); |
| 65 | transition: background-color .2s ease; | 65 | transition: background-color .2s ease; |
| 66 | border-radius: 2em; | 66 | border-radius: 2em; |
| 67 | background-color: fn.color(--track-bg); | 67 | background-color: fn.color(--track-bg); |
diff --git a/src/objects/_text-field.scss b/src/objects/_text-field.scss index 90d4b11..b819811 100644 --- a/src/objects/_text-field.scss +++ b/src/objects/_text-field.scss | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | @use 'iro-sass/src/index' as iro; | 1 | @use 'iro-sass/src/index' as iro; |
| 2 | @use '../functions' as fn; | 2 | @use '../functions' as fn; |
| 3 | @use '../vars'; | ||
| 4 | @use '../mixins/typography'; | ||
| 5 | 3 | ||
| 6 | @mixin invalid { | 4 | @mixin invalid { |
| 7 | @include iro.bem-sibling-elem('bg') { | 5 | @include iro.bem-sibling-elem('bg') { |
| @@ -108,8 +106,6 @@ | |||
| 108 | } | 106 | } |
| 109 | 107 | ||
| 110 | @include iro.bem-elem('native') { | 108 | @include iro.bem-elem('native') { |
| 111 | @include typography.set-font(vars.$font--main, (size: 1em, line-height: vars.$line-height)); | ||
| 112 | |||
| 113 | width: 100%; | 109 | width: 100%; |
| 114 | color: fn.color(--text); | 110 | color: fn.color(--text); |
| 115 | resize: none; | 111 | resize: none; |
