From 4b16b704d196ecb1605e7cfe7ccc83bb21e76b6e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 12 Mar 2022 15:47:42 +0100 Subject: Added table variants --- src/objects/_table.scss | 87 +++++++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 35 deletions(-) (limited to 'src') diff --git a/src/objects/_table.scss b/src/objects/_table.scss index 9f414b8..ebfa49a 100644 --- a/src/objects/_table.scss +++ b/src/objects/_table.scss @@ -44,47 +44,12 @@ border-width: 1px 0 0; border-style: solid; border-color: fn.color(--border); - background-color: fn.color(--bg); - - &:first-child { - border-left-width: 1px; - } - - &:last-child { - border-right-width: 1px; - } } @include iro.bem-elem('row') { - &:first-child { - @include iro.bem-elem('cell') { - &:first-child { - border-top-left-radius: fn.dim(--rounding); - } - - &:last-child { - border-top-right-radius: fn.dim(--rounding); - } - } - } - &:last-child { @include iro.bem-elem('cell') { border-bottom-width: 1px; - - &:first-child { - border-bottom-left-radius: fn.dim(--rounding); - } - - &:last-child { - border-bottom-right-radius: fn.dim(--rounding); - } - } - } - - @include iro.bem-next-twin-elem { - @include iro.bem-elem('cell') { - border-top: 1px solid fn.color(--border); } } @@ -100,5 +65,57 @@ } } } + + @include iro.bem-modifier('flush') { + @include iro.bem-elem('head-cell', 'cell') { + &:first-child { + padding-left: 0; + } + + &:last-child { + padding-right: 0; + } + } + } + + @include iro.bem-modifier('box') { + @include iro.bem-elem('cell') { + background-color: fn.color(--bg); + + &:first-child { + border-left-width: 1px; + } + + &:last-child { + border-right-width: 1px; + } + } + + @include iro.bem-elem('row') { + &:first-child { + @include iro.bem-elem('cell') { + &:first-child { + border-top-left-radius: fn.dim(--rounding); + } + + &:last-child { + border-top-right-radius: fn.dim(--rounding); + } + } + } + + &:last-child { + @include iro.bem-elem('cell') { + &:first-child { + border-bottom-left-radius: fn.dim(--rounding); + } + + &:last-child { + border-bottom-right-radius: fn.dim(--rounding); + } + } + } + } + } } } -- cgit v1.2.3-54-g00ecf