@use 'sass:meta'; @use 'iro-sass/src/iro-sass' as iro; @use 'iro-sass/src/props'; @forward 'table.vars'; @use 'table.vars' as vars; @mixin styles { @include props.materialize(meta.module-variables('vars')); @include iro.bem-object('table') { border-spacing: 0; border-collapse: separate; @include iro.bem-modifier('fixed') { table-layout: fixed; } @include iro.bem-elem('head-cell') { padding-block: props.get(vars.$pad-b); padding-inline: props.get(vars.$pad-i); font-family: props.get(vars.$heading--font-family); font-size: props.get(vars.$heading--font-size); font-weight: props.get(vars.$heading--font-weight); color: props.get(vars.$heading-color); text-align: start; text-transform: props.get(vars.$heading--text-transform); letter-spacing: props.get(vars.$heading--letter-spacing); } @include iro.bem-elem('cell') { padding-block: props.get(vars.$pad-b); padding-inline: props.get(vars.$pad-i); border-color: props.get(vars.$border-color); border-style: solid; border-width: 0; border-block-start-width: props.get(vars.$border-width); @include iro.bem-modifier('divider') { border-inline-end-width: props.get(vars.$border-width); } } @include iro.bem-elem('row') { &:last-child { @include iro.bem-elem('cell') { border-block-end-width: props.get(vars.$border-width); } } } @include iro.bem-modifier('flush') { @include iro.bem-elem('head-cell', 'cell') { &:first-child { padding-inline-start: 0; } &:last-child { padding-inline-end: 0; } } } @include iro.bem-modifier('box') { @include iro.bem-elem('cell') { background-color: props.get(vars.$box--bg-color); &:first-child { border-inline-start-width: props.get(vars.$border-width); } &:last-child { border-inline-end-width: props.get(vars.$border-width); } } @include iro.bem-elem('row') { &:first-child { @include iro.bem-elem('cell') { &:first-child { border-start-start-radius: props.get(vars.$rounding); } &:last-child { border-start-end-radius: props.get(vars.$rounding); } } } &:last-child { @include iro.bem-elem('cell') { &:first-child { border-end-start-radius: props.get(vars.$rounding); } &:last-child { border-end-end-radius: props.get(vars.$rounding); } } } } } @include iro.bem-modifier('interactive') { @include iro.bem-elem('row') { @include iro.bem-elem('cell') { cursor: pointer; } &:hover { @include iro.bem-elem('cell') { background-color: props.get(vars.$hover--bg-color); } } &:active { @include iro.bem-elem('cell') { background-color: props.get(vars.$active--bg-color); } } } @include iro.bem-modifier('box') { @include iro.bem-elem('row') { &:hover { @include iro.bem-elem('cell') { background-color: props.get(vars.$box--hover--bg-color); } } &:active { @include iro.bem-elem('cell') { background-color: props.get(vars.$box--active--bg-color); } } } } } @include iro.bem-modifier('sm') { @include iro.bem-elem('head-cell', 'cell') { padding-block: props.get(vars.$pad-b--sm); } } } }