border.scss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /**
  2. * 边框相关快捷样式类
  3. * @since 1.0.0
  4. * @version 1.0.0
  5. */
  6. .bd {
  7. border-width: 0.5px;
  8. border-style: solid;
  9. }
  10. .bd-t {
  11. position: relative;
  12. &::after {
  13. content: ' ';
  14. position: absolute;
  15. width: 100%;
  16. height: 1.5px;
  17. left: 0;
  18. right: 0;
  19. top: 0;
  20. transform: scaleY(0.5);
  21. background-color: #eee;
  22. }
  23. }
  24. // 小程序无法呈现1px像素
  25. .bd-b {
  26. position: relative;
  27. //border-bottom-width: 0.5px;
  28. //border-bottom-style: solid;
  29. &::after {
  30. content: ' ';
  31. position: absolute;
  32. width: 100%;
  33. height: 1.5px;
  34. left: 0;
  35. right: 0;
  36. bottom: 0;
  37. transform: scaleY(0.5);
  38. background-color: #eee;
  39. }
  40. }
  41. .bd-b-1 {
  42. position: relative;
  43. &::after {
  44. content: '';
  45. position: absolute;
  46. width: 100%;
  47. // height: 1px;
  48. left: 0;
  49. right: 0;
  50. bottom: 0;
  51. transform: scaleY(0.3);
  52. -webkit-transform: scaleY(0.3);
  53. background-color: #e0e0e0;
  54. border-bottom: 1px solid rgb(235, 237, 240);
  55. }
  56. }
  57. .bd-l {
  58. position: relative;
  59. &::after {
  60. content: '';
  61. position: absolute;
  62. width: 1px;
  63. height: 100%;
  64. left: 0;
  65. top: 0;
  66. bottom: 0;
  67. transform: scaleX(0.5);
  68. background-color: #e0e0e0;
  69. }
  70. }
  71. .bd-r {
  72. position: relative;
  73. &::after {
  74. content: '';
  75. position: absolute;
  76. width: 1px;
  77. height: 100%;
  78. right: 0;
  79. top: 0;
  80. bottom: 0;
  81. transform: scaleX(0.5);
  82. background-color: #e0e0e0;
  83. }
  84. }
  85. /* ==========================================================================
  86. 圆角弧度相关
  87. ========================================================================== */
  88. $ui-border-radius: namespace('bdr');
  89. $ui-bdr-map: (
  90. '0': 0,
  91. '4': 4px,
  92. '8': 8px,
  93. '10': 10px,
  94. '20': 20px,
  95. '30': 30px,
  96. );
  97. @each $key, $value in $ui-bdr-map {
  98. .#{$ui-border-radius + $key} {
  99. overflow: hidden;
  100. border-radius: $value;
  101. }
  102. }