ruler.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @import "vars";
  2. @import "mixins";
  3. .ruler {
  4. position: absolute;
  5. width: 100%;
  6. border-bottom:1px dotted #e17878;
  7. background-clip: padding-box;
  8. z-index: 5;
  9. cursor: ns-resize;
  10. .ruler-value {
  11. display: inline-block;
  12. background-color: $blue;
  13. background-color: #e17878;
  14. color: white;
  15. font-size: 11px;
  16. line-height: 1;
  17. position: absolute;
  18. text-align: center;
  19. opacity: 0;
  20. }
  21. &:hover {
  22. .ruler-value {
  23. opacity: 1;
  24. }
  25. }
  26. &.horz {
  27. top: 50px;
  28. width: 100%;
  29. border-bottom:1px dotted #e17878;
  30. height: 1px;
  31. cursor: ns-resize;
  32. &:hover {
  33. border-bottom-style: solid;
  34. }
  35. .ruler-value {
  36. left: 250px;
  37. top: 0;
  38. border-bottom-left-radius: 60px;
  39. border-bottom-right-radius: 60px;
  40. width: 40px;
  41. height: 40px;
  42. line-height: 40px;
  43. }
  44. }
  45. &.vert {
  46. left: 50px;
  47. height: 100%;
  48. border-left:1px dotted #e17878;
  49. width: 1px;
  50. cursor: ew-resize;
  51. &:hover {border-left-style: solid; }
  52. .ruler-value {
  53. left: 0;
  54. top: 250px;
  55. border-top-right-radius: 60px;
  56. border-bottom-right-radius: 60px;
  57. height: 40px;
  58. width: 40px;
  59. line-height: 40px;
  60. }
  61. }
  62. }