Make WordPress Core

Changeset 21336


Ignore:
Timestamp:
07/25/2012 06:44:37 PM (12 years ago)
Author:
lancewillett
Message:

Twenty Twelve: CSS cleanup for clearing float method. Use overflow: hidden; and leave the other method intact in .clear rule so child themes can use it if needed. See #21381.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/style.css

    r21334 r21336  
    119119video {
    120120    display: inline-block;
    121     *display: inline;
    122     *zoom: 1;
    123121}
    124122audio:not([controls]) {
     
    142140    -ms-interpolation-mode: bicubic;
    143141}
    144 .clear {
    145     zoom: 1;
     142
     143/* Clearing floats */
     144
     145.clear:after {
     146    clear: both;
    146147}
    147148.clear:before,
     
    149150    display: table;
    150151    content: "";
    151 }
    152 .clear:after {
    153     clear: both;
    154152}
    155153
     
    379377/* Author profiles */
    380378#author-info {
    381     zoom: 1;
     379    border-top: 1px solid #ededed;
    382380    margin: 24px 0;
    383381    margin: 1.714285714rem 0;
    384382    padding-top: 24px;
    385383    padding-top: 1.714285714rem;
    386     border-top: 1px solid #ededed;
    387 }
    388 #author-info:before,
    389 #author-info:after {
    390     display: table;
    391     content: "";
    392 }
    393 #author-info:after {
    394     clear: both;
     384    overflow: hidden;
    395385}
    396386@media screen and (min-width: 600px) {
     
    452442@media screen and (min-width: 600px) {
    453443    #page {
    454         zoom: 1;
    455444        margin: 0 auto;
    456445        max-width: 960px;
    457446        max-width: 68.571428571rem;
    458     }
    459     #page:before,
    460     #page:after {
    461         display: table;
    462         content: "";
    463     }
    464     #page:after {
    465         clear: both;
     447        overflow: hidden;
    466448    }
    467449}
     
    491473}
    492474#main {
    493     zoom: 1;
    494 }
    495 #main:before,
    496 #main:after {
    497     display: table;
    498     content: "";
    499 }
    500 #main:after {
    501     clear: both;
     475    overflow: hidden;
    502476}
    503477#primary {
     
    723697/* Footer */
    724698footer[role="contentinfo"] {
     699    border-top: 1px solid #ededed;
    725700    clear: both;
    726     zoom: 1;
    727701    max-width: 960px;
    728702    max-width: 68.571428571rem;
     
    733707    padding: 24px 0;
    734708    padding: 1.714285714rem 0;
    735     border-top: 1px solid #ededed;
    736 }
    737 footer[role="contentinfo"]:before,
    738 footer[role="contentinfo"]:after {
    739     display: table;
    740     content: "";
    741 }
    742 footer[role="contentinfo"]:after {
    743     clear: both;
     709    overflow: hidden;
    744710}
    745711footer[role="contentinfo"] a {
     
    817783@media screen and (min-width: 600px) {
    818784    article.sticky header.entry-header {
    819         zoom: 1;
    820785        float: left;
    821786        max-width: 73.6%;
    822     }
    823     article.sticky header.entry-header:before,
    824     article.sticky header.entry-header:after {
    825         display: table;
    826         content: "";
    827     }
    828     article.sticky header.entry-header:after {
    829         clear: both;
     787        overflow: hidden;
    830788    }
    831789    article.sticky .featured-post {
     
    11981156}
    11991157#comments article {
    1200     zoom: 1;
    12011158    margin: 24px 0;
    12021159    margin: 1.714285714rem 0;
    1203 }
    1204 #comments article:before,
    1205 #comments article:after {
    1206     display: table;
    1207     content: "";
    1208 }
    1209 #comments article:after {
    1210     clear: both;
     1160    overflow: hidden;
    12111161}
    12121162#comments article header {
    1213     position: relative;
    1214     zoom: 1;
    12151163    margin: 0 0 48px;
    12161164    margin: 0 0 3.428571429rem;
    1217 }
    1218 #comments article header:before,
    1219 #comments article header:after {
    1220     display: table;
    1221     content: "";
    1222 }
    1223 #comments article header:after {
    1224     clear: both;
     1165    overflow: hidden;
     1166    position: relative;
    12251167}
    12261168#comments article header img {
     
    13311273}
    13321274#respond form p {
    1333     zoom: 1;
    13341275    margin: 11px 0;
    13351276    margin: 0.785714286rem 0;
    1336 }
    1337 #respond form p:before,
    1338 #respond form p:after {
    1339     display: table;
    1340     content: "";
    1341 }
    1342 #respond form p:after {
    1343     clear: both;
     1277    overflow: hidden;
    13441278}
    13451279#respond form p.logged-in-as {
     
    13951329    div.home-top,
    13961330    div.home-middle {
    1397         zoom: 1;
    1398     }
    1399     div.home-top:before,
    1400     div.home-top:after,
    1401     div.home-middle:before,
    1402     div.home-middle:after {
    1403         display: table;
    1404         content: "";
    1405     }
    1406     div.home-top:after,
    1407     div.home-middle:after {
    1408         clear: both;
     1331        overflow: hidden;
    14091332    }
    14101333}
     
    14151338@media screen and (min-width: 600px) {
    14161339    section.home-content {
    1417         zoom: 1;
    1418     }
    1419     section.home-content:before,
    1420     section.home-content:after {
    1421         display: table;
    1422         content: "";
    1423     }
    1424     section.home-content:after {
    1425         clear: both;
     1340        overflow: hidden;
    14261341    }
    14271342    section.home-content h1.entry-title {
     
    14441359@media screen and (min-width: 600px) {
    14451360    .page-template-homepage-php #content {
    1446         zoom: 1;
    1447     }
    1448     .page-template-homepage-php #content:before,
    1449     .page-template-homepage-php #content:after {
    1450         display: table;
    1451         content: "";
    1452     }
    1453     .page-template-homepage-php #content:after {
    1454         clear: both;
     1361        overflow: hidden;
    14551362    }
    14561363}
Note: See TracChangeset for help on using the changeset viewer.