説明なし

style.css 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. /*!rtl:begin:ignore*/
  73. direction: ltr;
  74. /*!rtl:end:ignore*/
  75. display: grid;
  76. grid-template-columns: 50% 1fr;
  77. grid-template-rows: auto;
  78. }
  79. .wp-block-media-text.has-media-on-the-right {
  80. grid-template-columns: 1fr 50%;
  81. }
  82. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__content,
  83. .wp-block-media-text.is-vertically-aligned-top .wp-block-media-text__media {
  84. align-self: start;
  85. }
  86. .wp-block-media-text .wp-block-media-text__content,
  87. .wp-block-media-text .wp-block-media-text__media,
  88. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__content,
  89. .wp-block-media-text.is-vertically-aligned-center .wp-block-media-text__media {
  90. align-self: center;
  91. }
  92. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__content,
  93. .wp-block-media-text.is-vertically-aligned-bottom .wp-block-media-text__media {
  94. align-self: end;
  95. }
  96. .wp-block-media-text .wp-block-media-text__media {
  97. /*!rtl:begin:ignore*/
  98. grid-column: 1;
  99. grid-row: 1;
  100. /*!rtl:end:ignore*/
  101. margin: 0;
  102. }
  103. .wp-block-media-text .wp-block-media-text__content {
  104. direction: ltr;
  105. /*!rtl:begin:ignore*/
  106. grid-column: 2;
  107. grid-row: 1;
  108. /*!rtl:end:ignore*/
  109. padding: 0 8% 0 8%;
  110. word-break: break-word;
  111. }
  112. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__media {
  113. /*!rtl:begin:ignore*/
  114. grid-column: 2;
  115. grid-row: 1;
  116. /*!rtl:end:ignore*/
  117. }
  118. .wp-block-media-text.has-media-on-the-right .wp-block-media-text__content {
  119. /*!rtl:begin:ignore*/
  120. grid-column: 1;
  121. grid-row: 1;
  122. /*!rtl:end:ignore*/
  123. }
  124. .wp-block-media-text__media img,
  125. .wp-block-media-text__media video {
  126. max-width: unset;
  127. width: 100%;
  128. vertical-align: middle;
  129. }
  130. .wp-block-media-text.is-image-fill .wp-block-media-text__media {
  131. height: 100%;
  132. min-height: 250px;
  133. background-size: cover;
  134. }
  135. .wp-block-media-text.is-image-fill .wp-block-media-text__media > a {
  136. display: block;
  137. height: 100%;
  138. }
  139. .wp-block-media-text.is-image-fill .wp-block-media-text__media img {
  140. position: absolute;
  141. width: 1px;
  142. height: 1px;
  143. padding: 0;
  144. margin: -1px;
  145. overflow: hidden;
  146. clip: rect(0, 0, 0, 0);
  147. border: 0;
  148. }
  149. /*
  150. * Here we here not able to use a mobile first CSS approach.
  151. * Custom widths are set using inline styles, and on mobile,
  152. * we need 100% width, so we use important to overwrite the inline style.
  153. * If the style were set on mobile first, on desktop styles,
  154. * we would have no way of setting the style again to the inline style.
  155. */
  156. @media (max-width: 600px) {
  157. .wp-block-media-text.is-stacked-on-mobile {
  158. grid-template-columns: 100% !important;
  159. }
  160. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__media {
  161. grid-column: 1;
  162. grid-row: 1;
  163. }
  164. .wp-block-media-text.is-stacked-on-mobile .wp-block-media-text__content {
  165. grid-column: 1;
  166. grid-row: 2;
  167. }
  168. }