You are here

gridstack.layout.css in GridStack 8.2

Same filename and directory in other branches
  1. 8 css/gridstack.layout.css

This file is loaded for Layout Builder integration.

The provided rules are not available at CSS framework, internal utilities.

At most cases, might need to re-touch this file.

File

css/gridstack.layout.css
View source
  1. /**
  2. * @file
  3. * This file is loaded for Layout Builder integration.
  4. *
  5. * The provided rules are not available at CSS framework, internal utilities.
  6. *
  7. * At most cases, might need to re-touch this file.
  8. */
  9. /* Vertical margin rules. */
  10. .vm-xs .box {
  11. margin-bottom: 5px;
  12. margin-top: 5px;
  13. }
  14. .vm-sm .box {
  15. margin-bottom: 10px;
  16. margin-top: 10px;
  17. }
  18. .vm-md .box {
  19. margin-bottom: 15px;
  20. margin-top: 15px;
  21. }
  22. .vm-lg .box {
  23. margin-bottom: 20px;
  24. margin-top: 20px;
  25. }
  26. .vm-xl .box {
  27. margin-bottom: 30px;
  28. margin-top: 30px;
  29. }
  30. /* Padding rules. */
  31. /* Stick to a CSS framework, at least Bootstrap, for left and right padding. */
  32. .p-xs {
  33. padding: 15px;
  34. }
  35. .p-sm {
  36. padding: 30px 15px;
  37. }
  38. .p-md {
  39. padding: 60px 15px;
  40. }
  41. .p-lg {
  42. padding: 120px 15px 60px;
  43. }
  44. .p-xl {
  45. padding: 210px 15px 60px;
  46. }
  47. /**
  48. * Min height to fix collapsed containers with contentless or edge to edge
  49. * due to background absolute position.
  50. * Media element (IMG, IFRAME, VIDEO) has class is-gs-media.
  51. * The min-height is configurable via Layout Builder UI, hence just basic.
  52. */
  53. .b-gs,
  54. .is-gs-media {
  55. min-height: 120px;
  56. }
  57. /* Ensures configurable options respected, put after the above. */
  58. .mh-xs {
  59. min-height: 240px;
  60. }
  61. .mh-sm {
  62. min-height: 320px;
  63. }
  64. .mh-md {
  65. min-height: 480px;
  66. }
  67. .mh-lg {
  68. min-height: 640px;
  69. }
  70. .mh-xl {
  71. min-height: 720px;
  72. }
  73. /* XS < 576px, SM >= 576px, MD >= 768px, LG >= 992px, XL >= 1200px */
  74. @media screen and (min-width: 768px) {
  75. .mh-md-xs {
  76. min-height: 240px;
  77. }
  78. .mh-md-sm {
  79. min-height: 320px;
  80. }
  81. .mh-md-md {
  82. min-height: 480px;
  83. }
  84. .mh-md-lg {
  85. min-height: 640px;
  86. }
  87. .mh-md-xl {
  88. min-height: 720px;
  89. }
  90. }
  91. @media screen and (min-width:1200px) {
  92. .mh-lg-xs {
  93. min-height: 240px;
  94. }
  95. .mh-lg-sm {
  96. min-height: 320px;
  97. }
  98. .mh-lg-md {
  99. min-height: 480px;
  100. }
  101. .mh-lg-lg {
  102. min-height: 640px;
  103. }
  104. .mh-lg-xl {
  105. min-height: 720px;
  106. }
  107. }
  108. /* BG position. */
  109. .bg-bottom .b-bg {
  110. background-position: bottom;
  111. }
  112. .bg-left .b-bg {
  113. background-position: left;
  114. }
  115. .bg-right .b-bg {
  116. background-position: right;
  117. }
  118. .bg-top .b-bg {
  119. background-position: top;
  120. }
  121. .bg-bottom-left .b-bg {
  122. background-position: bottom left;
  123. }
  124. .bg-bottom-right .b-bg {
  125. background-position: bottom right;
  126. }
  127. .bg-top-left .b-bg {
  128. background-position: top left;
  129. }
  130. .bg-top-right .b-bg {
  131. background-position: top right;
  132. }
  133. /* Bg dark with opacity */
  134. .bg-dark-20 {
  135. background-color: rgba(0, 0, 0, .2);
  136. }
  137. .bg-dark-40 {
  138. background-color: rgba(0, 0, 0, .4);
  139. }
  140. .bg-dark-60 {
  141. background-color: rgba(0, 0, 0, .6);
  142. }
  143. .bg-dark-80 {
  144. background-color: rgba(0, 0, 0, .8);
  145. }
  146. .bg-dark-90 {
  147. background-color: rgba(0, 0, 0, .9);
  148. }
  149. /* Be careful, breaking layout. */
  150. .row [class*="rounded"] { /* csslint allow: unqualified-attributes */
  151. position: relative;
  152. overflow: hidden;
  153. }
  154. .row [class*="rounded"] .box__bg { /* csslint allow: unqualified-attributes */
  155. padding-left: 0;
  156. padding-right: 0;
  157. }