Skip to content

Commit

Permalink
feat 👍 add color_context mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
synchrovision committed Jun 3, 2022
1 parent b9c30d2 commit c69da99
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions context.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@charset "utf-8";

@mixin color_context{
:root,.color0{
@each $r in (b,s,t,m,a,i){
--cp-context-color-#{$r}:hsla(var(--cp-tones-context-#{$r}-h),var(--cp-tones-context-#{$r}-s),var(--cp-tones-context-#{role}-l),1);
@each $k in (h,s,l,t){
--cp-context-tones-#{$r}-#{$k}:var(--cp-tones-#{$r}-#{$k});
}
}
}
@for $i from 1 through 12{
.color#{$i}{
$c:$i - 6;
@each $r in (b,s,t,m,a,i){
--cp-context-tones-#{$r}-h:calc(var(--cp-tones-#{$r}-h) + var(--cp-tones-hr) * #{$c} + var(--cp-tones-hs));
}
}
}
}

0 comments on commit c69da99

Please sign in to comment.