mirror of
https://github.com/tabler/tabler.git
synced 2026-10-12 21:27:06 +04:00
17 lines
785 B
SCSS
17 lines
785 B
SCSS
// Tests for `rgba-css-var()` in scss/mixins/_functions.scss. A plain `@use` of
|
|
// the functions module is enough — no fixtures. It emits unprefixed names: the
|
|
// `--tblr-` prefix is added later, by the css pipeline (.build/css-var-prefix.ts).
|
|
|
|
@use 'sass:meta';
|
|
@use '../mixins/functions' as *;
|
|
|
|
@include describe('rgba-css-var') {
|
|
@include it('builds a color-mix() from the identifier and target opacity') {
|
|
@include assert-equal(meta.inspect(rgba-css-var('primary', 'bg')), 'color-mix(in oklab, var(--primary) calc(var(--bg-opacity) * 100%), transparent)');
|
|
}
|
|
|
|
@include it('special-cases the body background') {
|
|
@include assert-equal(meta.inspect(rgba-css-var('body', 'bg')), 'color-mix(in oklab, var(--body-bg) calc(var(--bg-opacity) * 100%), transparent)');
|
|
}
|
|
}
|