qcss.less 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // QCSS spacing © https://github.com/diqidoq/qcss under GPL 3
  2. @space: 5px;
  3. @min-height: 43px;
  4. .generate-spacing-steps(4);
  5. .generate-spacing-steps(@n, @i: 0) when (@i =< @n) {
  6. .m-@{i} {
  7. margin-top: (@space * @i) !important;
  8. margin-right: (@space * @i) !important;
  9. margin-bottom: (@space * @i) !important;
  10. margin-left: (@space * @i) !important;
  11. }
  12. .mt-@{i} {
  13. margin-top: (@space * @i) !important;
  14. }
  15. .mr-@{i} {
  16. margin-right: (@space * @i) !important;
  17. }
  18. .mb-@{i} {
  19. margin-bottom: (@space * @i) !important;
  20. }
  21. .ml-@{i} {
  22. margin-left: (@space * @i) !important;
  23. }
  24. .mx-@{i} {
  25. margin-left: (@space * @i) !important;
  26. margin-right: (@space * @i) !important;
  27. }
  28. .my-@{i} {
  29. margin-top: (@space * @i) !important;
  30. margin-bottom: (@space * @i) !important;
  31. }
  32. .p-@{i} {
  33. padding-top: (@space * @i) !important;
  34. padding-right: (@space * @i) !important;
  35. padding-bottom: (@space * @i) !important;
  36. padding-left: (@space * @i) !important;
  37. }
  38. .pt-@{i} {
  39. padding-top: (@space * @i) !important;
  40. }
  41. .pr-@{i} {
  42. padding-right: (@space * @i) !important;
  43. }
  44. .pb-@{i} {
  45. padding-bottom: (@space * @i) !important;
  46. }
  47. .pl-@{i} {
  48. padding-left: (@space * @i) !important;
  49. }
  50. .px-@{i} {
  51. padding-left: (@space * @i) !important;
  52. padding-right: (@space * @i) !important;
  53. }
  54. .py-@{i} {
  55. padding-top: (@space * @i) !important;
  56. padding-bottom: (@space * @i) !important;
  57. }
  58. .generate-spacing-steps(@n, (@i + 1));
  59. }
  60. .mx-auto {
  61. margin: 0 auto !important;
  62. float: none !important;
  63. }
  64. .my-auto-parent {
  65. position: relative !important;
  66. }
  67. .my-auto {
  68. position: absolute !important;
  69. top: 50% !important;
  70. transform: translateY(-50%) !important;
  71. }