Make WordPress Core

Ticket #50376: 50376.patch

File 50376.patch, 1.4 KB (added by sabernhardt, 4 years ago)

Employ the child combinator for non-gallery caption styles, to avoid applying them to gallery image captions within other blocks

  • src/wp-content/themes/twentyseventeen/assets/css/blocks.css

     
    2020
    2121/* Captions */
    2222
    23 [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
     23[class^="wp-block-"]:not(.wp-block-gallery) > figcaption {
    2424        font-style: italic;
    2525        margin-bottom: 1.5em;
    2626        text-align: left;
    2727}
    2828
    29 .rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
     29.rtl [class^="wp-block-"]:not(.wp-block-gallery) > figcaption {
    3030        text-align: right;
    3131}
    3232
  • src/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css

     
    459459
    460460/* Caption styles*/
    461461
    462 [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
     462[class^="wp-block-"]:not(.wp-block-gallery) > figcaption {
    463463        font-style: italic;
    464464        margin-bottom: 1.5em;
    465465        text-align: left;
    466466}
    467467
    468 .rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
     468.rtl [class^="wp-block-"]:not(.wp-block-gallery) > figcaption {
    469469        text-align: right;
    470470}
    471471