/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
core/scss/tests/_rfs.test.scss
30 строк
1 KB
Paweł Kuna
Unify workspace lint, format, and type-check quality gates (#2732)
30 июл 2026, 20:36
Не верифицирован
30 июл 2026, 20:36
6db32ea
Код
Авторство
О чём код?
// Tests for the RFS (responsive font sizing) helper functions in // scss/mixins/bootstrap/_rfs.scss. Both build their result via string // concatenation, so they return unquoted strings (compared as strings here). // // `rfs-value` gives the static value (px normalised to rem); `rfs-fluid-value` // gives the fluid value — unchanged below the base size, a responsive `calc()` // above it. @use '../mixins/bootstrap/rfs' as *; @include describe('rfs-value') { @include it('passes rem values through and keeps 0') { @include assert-equal(rfs-value(2rem), '2rem'); @include assert-equal(rfs-value(0), '0'); } @include it('normalises px to rem') { @include assert-equal(rfs-value(20px), '1.25rem'); } } @include describe('rfs-fluid-value') { @include it('leaves values at or below the base size unchanged') { @include assert-equal(rfs-fluid-value(1rem), '1rem'); } @include it('produces a responsive calc() above the base size') { @include assert-equal(rfs-fluid-value(3rem), 'calc(1.425rem + 2.1vw)'); } }