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