style.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. /**
  2. * Colors
  3. */
  4. /**
  5. * Breakpoints & Media Queries
  6. */
  7. /**
  8. * SCSS Variables.
  9. *
  10. * Please use variables from this sheet to ensure consistency across the UI.
  11. * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
  12. * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
  13. */
  14. /**
  15. * Colors
  16. */
  17. /**
  18. * Fonts & basic variables.
  19. */
  20. /**
  21. * Grid System.
  22. * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
  23. */
  24. /**
  25. * Dimensions.
  26. */
  27. /**
  28. * Shadows.
  29. */
  30. /**
  31. * Editor widths.
  32. */
  33. /**
  34. * Block & Editor UI.
  35. */
  36. /**
  37. * Block paddings.
  38. */
  39. /**
  40. * React Native specific.
  41. * These variables do not appear to be used anywhere else.
  42. */
  43. /**
  44. * Converts a hex value into the rgb equivalent.
  45. *
  46. * @param {string} hex - the hexadecimal value to convert
  47. * @return {string} comma separated rgb values
  48. */
  49. /**
  50. * Breakpoint mixins
  51. */
  52. /**
  53. * Long content fade mixin
  54. *
  55. * Creates a fading overlay to signify that the content is longer
  56. * than the space allows.
  57. */
  58. /**
  59. * Focus styles.
  60. */
  61. /**
  62. * Applies editor left position to the selector passed as argument
  63. */
  64. /**
  65. * Styles that are reused verbatim in a few places
  66. */
  67. /**
  68. * Allows users to opt-out of animations via OS-level preferences.
  69. */
  70. /**
  71. * Reset default styles for JavaScript UI based pages.
  72. * This is a WP-admin agnostic reset
  73. */
  74. /**
  75. * Reset the WP Admin page styles for Gutenberg-like pages.
  76. */
  77. .wp-block-media-text {
  78. /*!rtl:begin:ignore*/
  79. direction: ltr;
  80. /*!rtl:end:ignore*/
  81. display: grid;
  82. grid-template-columns: 50% 1fr;
  83. grid-template-rows: auto;
  84. box-sizing: border-box;
  85. }
  86. .wp-block-media-text.has-media-on-the-right {
  87. grid-template-columns: 1fr 50%;
  88. }
  89. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__content,
  90. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__media {
  91. align-self: start;
  92. }
  93. .wp-block-media-text .wp-block-media-text__content,
  94. .wp-block-media-text .wp-block-media-text__media,
  95. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__content,
  96. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__media {
  97. align-self: center;
  98. }
  99. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__content,
  100. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__media {
  101. align-self: end;
  102. }
  103. .wp-block-media-text .wp-block-media-text__media {
  104. /*!rtl:begin:ignore*/
  105. grid-column: 1;
  106. grid-row: 1;
  107. /*!rtl:end:ignore*/
  108. margin: 0;
  109. }
  110. .wp-block-media-text .wp-block-media-text__content {
  111. direction: ltr;
  112. /*!rtl:begin:ignore*/
  113. grid-column: 2;
  114. grid-row: 1;
  115. /*!rtl:end:ignore*/
  116. padding: 0 8% 0 8%;
  117. word-break: break-word;
  118. }
  119. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
  120. /*!rtl:begin:ignore*/
  121. grid-column: 2;
  122. grid-row: 1;
  123. /*!rtl:end:ignore*/
  124. }
  125. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
  126. /*!rtl:begin:ignore*/
  127. grid-column: 1;
  128. grid-row: 1;
  129. /*!rtl:end:ignore*/
  130. }
  131. .wp-block-media-text__media img,
  132. .wp-block-media-text__media video {
  133. height: auto;
  134. max-width: unset;
  135. width: 100%;
  136. vertical-align: middle;
  137. }
  138. .wp-block-media-text.is-image-fill .wp-block-media-text__media {
  139. height: 100%;
  140. min-height: 250px;
  141. background-size: cover;
  142. }
  143. .wp-block-media-text.is-image-fill .wp-block-media-text__media > a {
  144. display: block;
  145. height: 100%;
  146. }
  147. .wp-block-media-text.is-image-fill .wp-block-media-text__media img {
  148. position: absolute;
  149. width: 1px;
  150. height: 1px;
  151. padding: 0;
  152. margin: -1px;
  153. overflow: hidden;
  154. clip: rect(0, 0, 0, 0);
  155. border: 0;
  156. }
  157. /*
  158. * Here we here not able to use a mobile first CSS approach.
  159. * Custom widths are set using inline styles, and on mobile,
  160. * we need 100% width, so we use important to overwrite the inline style.
  161. * If the style were set on mobile first, on desktop styles,
  162. * we would have no way of setting the style again to the inline style.
  163. */
  164. @media (max-width: 600px) {
  165. .wp-block-media-text.is-stacked-on-mobile {
  166. grid-template-columns: 100% !important;
  167. }
  168. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media {
  169. grid-column: 1;
  170. grid-row: 1;
  171. }
  172. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
  173. grid-column: 1;
  174. grid-row: 2;
  175. }
  176. }