@neatui/css 5.5.1 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/trim.scss CHANGED
@@ -164,29 +164,34 @@ $_radius-l: (
164
164
  }
165
165
  }
166
166
 
167
- @mixin _radius-token($media, $token, $value) {
168
- .#{$media}r-#{$token} {
169
- border-radius: $value;
170
- }
171
- .#{$media}r-t-#{$token} {
172
- border-top-left-radius: $value;
173
- border-top-right-radius: $value;
174
- }
175
- .#{$media}r-b-#{$token} {
176
- border-bottom-right-radius: $value;
177
- border-bottom-left-radius: $value;
178
- }
179
- .#{$media}r-lt-#{$token} {
180
- border-top-left-radius: $value;
181
- }
182
- .#{$media}r-rt-#{$token} {
183
- border-top-right-radius: $value;
184
- }
185
- .#{$media}r-lb-#{$token} {
186
- border-bottom-left-radius: $value;
187
- }
188
- .#{$media}r-rb-#{$token} {
189
- border-bottom-right-radius: $value;
167
+ // 圆角分三轮输出:$part 为 all / pair / corner,保证 总项 < 双角 < 单角
168
+ @mixin _radius-token($media, $token, $value, $part) {
169
+ @if $part == all {
170
+ .#{$media}r-#{$token} {
171
+ border-radius: $value;
172
+ }
173
+ } @else if $part == pair {
174
+ .#{$media}r-t-#{$token} {
175
+ border-top-left-radius: $value;
176
+ border-top-right-radius: $value;
177
+ }
178
+ .#{$media}r-b-#{$token} {
179
+ border-bottom-right-radius: $value;
180
+ border-bottom-left-radius: $value;
181
+ }
182
+ } @else {
183
+ .#{$media}r-lt-#{$token} {
184
+ border-top-left-radius: $value;
185
+ }
186
+ .#{$media}r-rt-#{$token} {
187
+ border-top-right-radius: $value;
188
+ }
189
+ .#{$media}r-lb-#{$token} {
190
+ border-bottom-left-radius: $value;
191
+ }
192
+ .#{$media}r-rb-#{$token} {
193
+ border-bottom-right-radius: $value;
194
+ }
190
195
  }
191
196
  }
192
197
 
@@ -251,17 +256,19 @@ $_radius-l: (
251
256
  .#{$media}r-full {
252
257
  border-radius: 10000em;
253
258
  }
254
- @each $sz, $value in $_radius-scale {
255
- @include _radius-token($media, $sz, $value);
256
- }
257
- @each $sz, $value in $_radius-s {
258
- @include _radius-token($media, "#{$sz}\\*s", $value);
259
- }
260
- @each $sz, $value in $_radius-m {
261
- @include _radius-token($media, "#{$sz}\\*m", $value);
262
- }
263
- @each $sz, $value in $_radius-l {
264
- @include _radius-token($media, "#{$sz}\\*l", $value);
259
+ @each $part in (all, pair, corner) {
260
+ @each $sz, $value in $_radius-scale {
261
+ @include _radius-token($media, $sz, $value, $part);
262
+ }
263
+ @each $sz, $value in $_radius-s {
264
+ @include _radius-token($media, "#{$sz}\\*s", $value, $part);
265
+ }
266
+ @each $sz, $value in $_radius-m {
267
+ @include _radius-token($media, "#{$sz}\\*m", $value, $part);
268
+ }
269
+ @each $sz, $value in $_radius-l {
270
+ @include _radius-token($media, "#{$sz}\\*l", $value, $part);
271
+ }
265
272
  }
266
273
 
267
274
  // 偏移量