hairline.less 681 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. @import '../var';
  2. .hairline-common() {
  3. position: absolute;
  4. box-sizing: border-box;
  5. content: ' ';
  6. pointer-events: none;
  7. }
  8. .hairline(@color: @border-color) {
  9. .hairline-common();
  10. top: -50%;
  11. right: -50%;
  12. bottom: -50%;
  13. left: -50%;
  14. border: 0 solid @color;
  15. transform: scale(0.5);
  16. }
  17. .hairline-top(@color: @border-color, @left: 0, @right: 0) {
  18. .hairline-common();
  19. top: 0;
  20. right: @right;
  21. left: @left;
  22. border-top: 1px solid @color;
  23. transform: scaleY(0.5);
  24. }
  25. .hairline-bottom(@color: @border-color, @left: 0, @right: 0) {
  26. .hairline-common();
  27. right: @right;
  28. bottom: 0;
  29. left: @left;
  30. border-bottom: 1px solid @color;
  31. transform: scaleY(0.5);
  32. }