Changeset 44263
- Timestamp:
- 12/17/2018 03:45:05 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43911
- Property svn:mergeinfo changed
-
trunk/src/wp-content/themes/twentysixteen/css/blocks.css
r44152 r44263 26 26 line-height: 1.6153846154; 27 27 padding-top: 0.5384615385em; 28 text-align: left; 29 } 30 31 .rtl [class^="wp-block-"] figcaption { 32 text-align: right; 28 33 } 29 34 … … 36 41 p.has-drop-cap:not(:focus)::first-letter { 37 42 font-size: 5em; 43 } 44 45 /* Image */ 46 47 @media screen and (min-width: 61.5625em) { 48 body:not(.search-results) article:not(.type-page) .wp-block-image figcaption.below-entry-meta { 49 clear: both; 50 display: block; 51 float: none; 52 margin-right: 0; 53 margin-left: -40%; 54 max-width: 140%; 55 } 56 57 body.rtl:not(.search-results) article:not(.type-page) .wp-block-image figcaption.below-entry-meta { 58 margin-left: 0; 59 margin-right: -40%; 60 } 38 61 } 39 62 -
trunk/src/wp-content/themes/twentysixteen/css/editor-blocks.css
r44152 r44263 263 263 line-height: 1.6153846154; 264 264 padding-top: 0.5384615385em; 265 text-align: left; 266 } 267 268 .rtl [class^="wp-block-"] figcaption { 269 text-align: right; 265 270 } 266 271 -
trunk/src/wp-content/themes/twentysixteen/js/functions.js
r40851 r44263 149 149 entryFooterPosBottom = entryFooterPos.top + ( entryFooter.height() + 28 ), 150 150 caption = element.closest( 'figure' ), 151 figcaption = element.next( 'figcaption' ), 151 152 newImg; 152 153 … … 155 156 156 157 // Check if full-size images and captions are larger than or equal to 840px. 157 if ( 'img.size-full' === param ) {158 if ( 'img.size-full' === param || '.wp-block-image img' === param ) { 158 159 159 160 // Create an image to find native image width of resized images (i.e. max-width: 100%). … … 162 163 163 164 $( newImg ).on( 'load.twentysixteen', function() { 164 if ( newImg.width >= 840 ) { 165 if ( newImg.width >= 840 ) { 166 167 // Check if an image in an image block has a width attribute; if its value is less than 840, return. 168 if ( '.wp-block-image img' === param && element.is( '[width]' ) && element.attr( 'width' ) < 840 ) { 169 return; 170 } 171 165 172 element.addClass( 'below-entry-meta' ); 166 173 … … 168 175 caption.addClass( 'below-entry-meta' ); 169 176 caption.removeAttr( 'style' ); 177 } 178 179 if ( figcaption ) { 180 figcaption.addClass( 'below-entry-meta' ); 170 181 } 171 182 } … … 191 202 belowEntryMetaClass( 'img.size-full' ); 192 203 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 204 belowEntryMetaClass( '.wp-block-image img' ); 193 205 }, 300 ); 194 206 onResizeARIA(); … … 197 209 belowEntryMetaClass( 'img.size-full' ); 198 210 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 211 belowEntryMetaClass( '.wp-block-image img' ); 199 212 } ); 200 213 } )( jQuery );
Note: See TracChangeset
for help on using the changeset viewer.