No Description

style-rtl.css 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. * Breakpoint mixins
  45. */
  46. /**
  47. * Long content fade mixin
  48. *
  49. * Creates a fading overlay to signify that the content is longer
  50. * than the space allows.
  51. */
  52. /**
  53. * Focus styles.
  54. */
  55. /**
  56. * Applies editor left position to the selector passed as argument
  57. */
  58. /**
  59. * Styles that are reused verbatim in a few places
  60. */
  61. /**
  62. * Allows users to opt-out of animations via OS-level preferences.
  63. */
  64. /**
  65. * Reset default styles for JavaScript UI based pages.
  66. * This is a WP-admin agnostic reset
  67. */
  68. /**
  69. * Reset the WP Admin page styles for Gutenberg-like pages.
  70. */
  71. .wp-block-media-text {
  72. direction: ltr;
  73. display: grid;
  74. grid-template-columns: 50% 1fr;
  75. grid-template-rows: auto;
  76. }
  77. .wp-block-media-text.has-media-on-the-right {
  78. grid-template-columns: 1fr 50%;
  79. }
  80. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__content,
  81. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__media {
  82. align-self: start;
  83. }
  84. .wp-block-media-text .wp-block-media-text__content,
  85. .wp-block-media-text .wp-block-media-text__media,
  86. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__content,
  87. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__media {
  88. align-self: center;
  89. }
  90. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__content,
  91. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__media {
  92. align-self: end;
  93. }
  94. .wp-block-media-text .wp-block-media-text__media {
  95. grid-column: 1;
  96. grid-row: 1;
  97. margin: 0;
  98. }
  99. .wp-block-media-text .wp-block-media-text__content {
  100. direction: rtl;
  101. grid-column: 2;
  102. grid-row: 1;
  103. padding: 0 8% 0 8%;
  104. word-break: break-word;
  105. }
  106. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
  107. grid-column: 2;
  108. grid-row: 1;
  109. }
  110. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
  111. grid-column: 1;
  112. grid-row: 1;
  113. }
  114. .wp-block-media-text__media img,
  115. .wp-block-media-text__media video {
  116. max-width: unset;
  117. width: 100%;
  118. vertical-align: middle;
  119. }
  120. .wp-block-media-text.is-image-fill .wp-block-media-text__media {
  121. height: 100%;
  122. min-height: 250px;
  123. background-size: cover;
  124. }
  125. .wp-block-media-text.is-image-fill .wp-block-media-text__media > a {
  126. display: block;
  127. height: 100%;
  128. }
  129. .wp-block-media-text.is-image-fill .wp-block-media-text__media img {
  130. position: absolute;
  131. width: 1px;
  132. height: 1px;
  133. padding: 0;
  134. margin: -1px;
  135. overflow: hidden;
  136. clip: rect(0, 0, 0, 0);
  137. border: 0;
  138. }
  139. /*
  140. * Here we here not able to use a mobile first CSS approach.
  141. * Custom widths are set using inline styles, and on mobile,
  142. * we need 100% width, so we use important to overwrite the inline style.
  143. * If the style were set on mobile first, on desktop styles,
  144. * we would have no way of setting the style again to the inline style.
  145. */
  146. @media (max-width: 600px) {
  147. .wp-block-media-text.is-stacked-on-mobile {
  148. grid-template-columns: 100% !important;
  149. }
  150. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media {
  151. grid-column: 1;
  152. grid-row: 1;
  153. }
  154. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
  155. grid-column: 1;
  156. grid-row: 2;
  157. }
  158. }