margin-columns.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @import "vars";
  2. @import "mixins";
  3. #margins {
  4. .btn-more,
  5. .btn-less {
  6. &:active .icon {
  7. opacity: 1;
  8. }
  9. .icon {
  10. color: white;
  11. opacity: 0.2;
  12. }
  13. }
  14. #margin {
  15. height: 200px;
  16. position: relative;
  17. .btn-toggle {
  18. margin: -22px;
  19. }
  20. label {
  21. pointer-events: none;
  22. margin-top: 62px;
  23. }
  24. .margin-icon {
  25. position: absolute;
  26. top: 50%;
  27. left: 50%;
  28. width: 140px;
  29. height: 140px;
  30. border: 2px solid rgba(0,0,0,0.1);
  31. border-radius: 4px;
  32. margin: -70px -70px;
  33. > div {
  34. position: absolute;
  35. display: inline-block;
  36. height: 30px;
  37. width: 30px;
  38. .input {
  39. padding: 0px;
  40. width: 30px;
  41. height: 30px;
  42. line-height: 30px;
  43. border: none;
  44. font-size: 22px;
  45. text-align: center;
  46. display: block;
  47. background-color: $light;
  48. }
  49. &.top {
  50. top: -15px; left: 50%; margin-left: -15px;
  51. .btn-more { right: -30px; top: 15px; }
  52. .btn-less { left: -30px; top: 15px; }
  53. }
  54. &.bottom {
  55. bottom: -15px; left: 50%; margin-left: -15px;
  56. .btn-more { right: -30px; bottom: 15px; }
  57. .btn-less { left: -30px; bottom: 15px; }
  58. }
  59. &.left {
  60. left: -16px; top: 50%; margin-top: -15px;
  61. .btn-more { left: 15px; top: -30px; }
  62. .btn-less { left: 15px; bottom: -30px; }
  63. }
  64. &.right {
  65. right: -16px; top: 50%; margin-top: -15px;
  66. .btn-more { right: 15px; top: -30px; }
  67. .btn-less { right: 15px; bottom: -30px; }
  68. }
  69. }
  70. }
  71. }
  72. }