From ecb57d0b722d12250ffb93db7c305d5c86928ee9 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 13 Mar 2022 12:33:32 +0100 Subject: Radio, check, switch: Removed right margin, added standalone option --- src/objects/_checkbox.scss | 9 +++++++-- src/objects/_radio.scss | 9 +++++++-- src/objects/_switch.scss | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/objects/_checkbox.scss b/src/objects/_checkbox.scss index f5c599b..412efda 100644 --- a/src/objects/_checkbox.scss +++ b/src/objects/_checkbox.scss @@ -9,7 +9,6 @@ --border-width: fn.global-dim(--border-width --medium), --pad-x: fn.global-dim(--size --65), --pad-y: fn.global-dim(--size --65), - --margin-right: fn.global-dim(--size --325), ), ), 'dims'); @@ -46,7 +45,7 @@ display: inline-flex; position: relative; align-items: flex-start; - margin-right: calc(-1 * fn.dim(--pad-x) + fn.dim(--margin-right)); + margin-right: calc(-1 * fn.dim(--pad-x)); margin-left: calc(-1 * fn.dim(--pad-x)); padding: fn.dim(--pad-y) fn.dim(--pad-x); @@ -190,6 +189,12 @@ } } + @include iro.bem-modifier('standalone') { + @include iro.bem-elem('box') { + margin-top: 0; + } + } + @include iro.bem-modifier('accent') { @include iro.bem-elem('native') { &:checked { diff --git a/src/objects/_radio.scss b/src/objects/_radio.scss index 9482c5b..c740833 100644 --- a/src/objects/_radio.scss +++ b/src/objects/_radio.scss @@ -9,7 +9,6 @@ --border-width: fn.global-dim(--border-width --medium), --pad-x: fn.global-dim(--size --65), --pad-y: fn.global-dim(--size --65), - --margin-right: fn.global-dim(--size --325), ), ), 'dims'); @@ -46,7 +45,7 @@ display: inline-flex; position: relative; align-items: flex-start; - margin-right: calc(-1 * fn.dim(--pad-x) + fn.dim(--margin-right)); + margin-right: calc(-1 * fn.dim(--pad-x)); margin-left: calc(-1 * fn.dim(--pad-x)); padding: fn.dim(--pad-y) fn.dim(--pad-x); @@ -136,6 +135,12 @@ } } + @include iro.bem-modifier('standalone') { + @include iro.bem-elem('circle') { + margin-top: 0; + } + } + @include iro.bem-modifier('accent') { @include iro.bem-elem('native') { &:checked { diff --git a/src/objects/_switch.scss b/src/objects/_switch.scss index 447335e..a818bde 100644 --- a/src/objects/_switch.scss +++ b/src/objects/_switch.scss @@ -10,7 +10,6 @@ --border-width: fn.global-dim(--border-width --medium), --pad-x: fn.global-dim(--size --65), --pad-y: fn.global-dim(--size --65), - --margin-right: fn.global-dim(--size --325), ), ), 'dims'); @@ -50,7 +49,7 @@ display: inline-flex; position: relative; align-items: flex-start; - margin-right: calc(-1 * fn.dim(--pad-x) + fn.dim(--margin-right)); + margin-right: calc(-1 * fn.dim(--pad-x)); margin-left: calc(-1 * fn.dim(--pad-x)); padding: fn.dim(--pad-y) fn.dim(--pad-x); @@ -173,6 +172,12 @@ } } + @include iro.bem-modifier('standalone') { + @include iro.bem-elem('indicator') { + margin-top: 0; + } + } + @include iro.bem-modifier('accent') { @include iro.bem-elem('native') { &:checked { -- cgit v1.2.3-70-g09d2