From edf687b4c1ac5b773509af77bf05d25e97f30825 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 16 Oct 2024 07:23:39 +0200 Subject: Put var application into mixin --- src/_declare-vars.scss | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/_declare-vars.scss') diff --git a/src/_declare-vars.scss b/src/_declare-vars.scss index 0aa1cca..afe1e15 100644 --- a/src/_declare-vars.scss +++ b/src/_declare-vars.scss @@ -271,3 +271,19 @@ ), ), $tree); } + +@mixin apply-vars { + :root { + @include iro.props-assign; + + @each $breakpoint in map.keys(media.$breakpoints) { + @include media.media('<=#{$breakpoint}') { + @include iro.props-assign($breakpoint); + } + } + + @media (prefers-color-scheme: dark) { + @include iro.props-assign('dark'); + } + } +} -- cgit v1.2.3-70-g09d2