洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

10 months ago
  1. @mixin radius($r,$d:null ,$important: false){
  2. $radius-value:map-get($uni-radius, $r) if($important, !important, null);
  3. // Key exists within the $uni-radius variable
  4. @if (map-has-key($uni-radius, $r) and $d){
  5. @if $d == t {
  6. border-top-left-radius:$radius-value;
  7. border-top-right-radius:$radius-value;
  8. }@else if $d == r {
  9. border-top-right-radius:$radius-value;
  10. border-bottom-right-radius:$radius-value;
  11. }@else if $d == b {
  12. border-bottom-left-radius:$radius-value;
  13. border-bottom-right-radius:$radius-value;
  14. }@else if $d == l {
  15. border-top-left-radius:$radius-value;
  16. border-bottom-left-radius:$radius-value;
  17. }@else if $d == tl {
  18. border-top-left-radius:$radius-value;
  19. }@else if $d == tr {
  20. border-top-right-radius:$radius-value;
  21. }@else if $d == br {
  22. border-bottom-right-radius:$radius-value;
  23. }@else if $d == bl {
  24. border-bottom-left-radius:$radius-value;
  25. }
  26. }@else{
  27. border-radius:$radius-value;
  28. }
  29. }
  30. @each $key, $child in $uni-radius {
  31. @if($key){
  32. .uni-radius-#{"" + $key} {
  33. @include radius($key)
  34. }
  35. }@else{
  36. .uni-radius {
  37. @include radius($key)
  38. }
  39. }
  40. }
  41. @each $direction in t, r, b, l,tl, tr, br, bl {
  42. @each $key, $child in $uni-radius {
  43. @if($key){
  44. .uni-radius-#{"" + $direction}-#{"" + $key} {
  45. @include radius($key,$direction,false)
  46. }
  47. }@else{
  48. .uni-radius-#{$direction} {
  49. @include radius($key,$direction,false)
  50. }
  51. }
  52. }
  53. }