WordPress.org

Make WordPress Core

Ticket #15103: 15790-gallery-styles.diff

File 15790-gallery-styles.diff, 1.1 KB (added by iandstewart, 8 years ago)
  • wp-includes/media.php

     
    839839                        }
    840840                </style>
    841841                <!-- see gallery_shortcode() in wp-includes/media.php -->
    842                 <div id='$selector' class='gallery galleryid-{$id}'>");
     842                <div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size}'>");
    843843
    844844        $i = 0;
    845845        foreach ( $attachments as $id => $attachment ) {
  • wp-content/themes/twentyten/style.css

     
    829829        text-align: center;
    830830        width: 33%;
    831831}
     832.gallery-columns-2 .gallery-item {
     833        width: 50%;
     834}
     835.gallery-columns-4 .gallery-item {
     836        width: 25%;
     837}
    832838.gallery img {
    833839        border: 2px solid #cfcfcf;
    834840}
     841.gallery-columns-2 .attachment-medium {
     842        max-width: 92%;
     843        height: auto;
     844}
     845.gallery-columns-4 .attachment-thumbnail {
     846        max-width: 84%;
     847        height: auto;
     848}
    835849.gallery .gallery-caption {
    836850        color: #888;
    837851        font-size: 12px;