浏览代码

Refactor border-radius CSS variable handling for improved clarity

codecalm 5 月之前
父节点
当前提交
ffdf712f8a
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      core/scss/_props.scss

+ 5 - 1
core/scss/_props.scss

@@ -73,7 +73,11 @@
   /** Border radiuses */
   /** Border radiuses */
   --#{$prefix}border-radius-scale: 1;
   --#{$prefix}border-radius-scale: 1;
   @each $name, $value in $border-radiuses {
   @each $name, $value in $border-radiuses {
-    --#{$prefix}border-radius#{if($name, '-#{$name}', '')}: calc(#{$value} * var(--#{$prefix}border-radius-scale, 1));
+    @if $name {
+      --#{$prefix}border-radius-#{$name}: calc(#{$value} * var(--#{$prefix}border-radius-scale, 1));
+    } @else {
+      --#{$prefix}border-radius: #{$value};
+    }
   }
   }
 
 
   /** Backdrops */
   /** Backdrops */