// ============================================================================= // Media // ============================================================================= /* Removes border when inside `a` element in IE 8/9 */ img { border: 0; -ms-interpolation-mode: bicubic; } /* Corrects overflow displayed oddly in IE9 */ svg:not(:root) { overflow: hidden; } /* Addresses margin not present in IE 8/9 and Safari 5 */ figure { margin: 0; } /** * Responsive images (ensure images don't scale beyond their parents) */ /* Fluid images for posts, comments, and widgets */ .entry-content img, .comment-content img, .widget img { max-width: 100%; width: auto\9; // IE7-8 need help adjusting responsive images height: auto; // Scale the height according to the width, otherwise you get stretching } .size-full, .size-large, .wp-post-image { max-width: 100%; height: auto; // Make sure images with WordPress-added height and width attributes are scaled correctly } /* Add fancy borders to all WordPress-added images */ .entry-content img, .comment-content img, .wp-post-image, .widget img, .thumbnail, .avatar { border-radius: 3px; box-shadow: 0 1px 4px fade(@black, 20%); } /* Post thumbnails */ .thumbnail { float: right; margin: 0 0 @smallGutterWidth @smallGutterWidth; } /* Aligned images */ img.aligncenter { margin: @smallGutterWidth auto; } img.alignleft { margin: 0 @smallGutterWidth 12px 0; } img.alignright { margin: 0 0 12px @smallGutterWidth; } /* Avatars */ .avatar { float: left; margin-right: @smallGutterWidth - 7px; } /* Remove borders from some images */ .wp-smiley, .no-image-border, .rsswidget img { border-radius: 0 !important; box-shadow: none !important; } /* Make sure videos and embeds fit their containers */ embed, iframe, object, video { max-width: 100%; } iframe { border: none; } /* Style `seamless` iframes */ iframe[seamless] { overflow: hidden; padding: 0; border: 0 none transparent; background-color: transparent; } /* Override the Twitter embed fixed width */ .entry-content .twitter-tweet-rendered { max-width: 100% !important; } /** * Captions [caption] */ .wp-caption { clear: both; max-width: 100%; padding-top: 5px; margin: @smallGutterWidth 0; background: @grayDarker; border-radius: 0 0 3px 3px; text-align: center; img { border-radius: 0; box-shadow: none; } // Aligned captions &.aligncenter { margin: @smallGutterWidth auto; } &.alignleft { margin: 0 @smallGutterWidth 0 0; } &.alignright { margin: 0 0 0 @smallGutterWidth; } } /* Caption text */ .wp-caption-text { padding: 10px 20px 20px; margin: 0; #font > .alternative(14); color: darken(#eee, 6.5%); } /** * Galleries */ .gallery, .gallery-row { display: block; overflow: hidden; clear: both; } .gallery { margin: @smallGutterWidth auto; text-align: center; } .gallery-row { margin: 0; } .gallery-item { overflow: hidden; float: left; .no-list-style(); text-align: center; } .gallery-caption { #font > .alternative(14); margin: 0 0 15px 0; } /* Gallery columns */ .gallery-cols(@index) when (@index > 0) { // Create the column class (~".col-@{index}") { width: percentage((100 / @index) / 100); } // Next column .gallery-cols(@index - 1); } // End the loop when index is 0 .gallery-cols(0) {} // Generate 30 columns .gallery-cols(30);