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.

git-svn-id: http://core.svn.wordpress.org/trunk@21336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
lancewillett 2012-07-25 18:44:37 +00:00
parent 2bc8fc305d
commit d23ef13dda
1 changed files with 19 additions and 112 deletions

131
style.css
View File

@ -118,8 +118,6 @@ audio,
canvas, canvas,
video { video {
display: inline-block; display: inline-block;
*display: inline;
*zoom: 1;
} }
audio:not([controls]) { audio:not([controls]) {
display: none; display: none;
@ -141,17 +139,17 @@ img {
border: 0; border: 0;
-ms-interpolation-mode: bicubic; -ms-interpolation-mode: bicubic;
} }
.clear {
zoom: 1; /* Clearing floats */
.clear:after {
clear: both;
} }
.clear:before, .clear:before,
.clear:after { .clear:after {
display: table; display: table;
content: ""; content: "";
} }
.clear:after {
clear: both;
}
/* =Repeatable patterns /* =Repeatable patterns
@ -378,20 +376,12 @@ img.wp-post-image {
/* Author profiles */ /* Author profiles */
#author-info { #author-info {
zoom: 1; border-top: 1px solid #ededed;
margin: 24px 0; margin: 24px 0;
margin: 1.714285714rem 0; margin: 1.714285714rem 0;
padding-top: 24px; padding-top: 24px;
padding-top: 1.714285714rem; padding-top: 1.714285714rem;
border-top: 1px solid #ededed; overflow: hidden;
}
#author-info:before,
#author-info:after {
display: table;
content: "";
}
#author-info:after {
clear: both;
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
#author-avatar { #author-avatar {
@ -451,18 +441,10 @@ a:hover {
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
#page { #page {
zoom: 1;
margin: 0 auto; margin: 0 auto;
max-width: 960px; max-width: 960px;
max-width: 68.571428571rem; max-width: 68.571428571rem;
} overflow: hidden;
#page:before,
#page:after {
display: table;
content: "";
}
#page:after {
clear: both;
} }
} }
@media screen and (min-width: 960px) { @media screen and (min-width: 960px) {
@ -490,15 +472,7 @@ a:hover {
} }
} }
#main { #main {
zoom: 1; overflow: hidden;
}
#main:before,
#main:after {
display: table;
content: "";
}
#main:after {
clear: both;
} }
#primary { #primary {
margin: 24px 0 0; margin: 24px 0 0;
@ -722,8 +696,8 @@ section[role="banner"] {
/* Footer */ /* Footer */
footer[role="contentinfo"] { footer[role="contentinfo"] {
border-top: 1px solid #ededed;
clear: both; clear: both;
zoom: 1;
max-width: 960px; max-width: 960px;
max-width: 68.571428571rem; max-width: 68.571428571rem;
margin-top: 24px; margin-top: 24px;
@ -732,15 +706,7 @@ footer[role="contentinfo"] {
margin-right: auto; margin-right: auto;
padding: 24px 0; padding: 24px 0;
padding: 1.714285714rem 0; padding: 1.714285714rem 0;
border-top: 1px solid #ededed; overflow: hidden;
}
footer[role="contentinfo"]:before,
footer[role="contentinfo"]:after {
display: table;
content: "";
}
footer[role="contentinfo"]:after {
clear: both;
} }
footer[role="contentinfo"] a { footer[role="contentinfo"] a {
font-size: 12px; font-size: 12px;
@ -816,17 +782,9 @@ article.sticky .featured-post {
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
article.sticky header.entry-header { article.sticky header.entry-header {
zoom: 1;
float: left; float: left;
max-width: 73.6%; max-width: 73.6%;
} overflow: hidden;
article.sticky header.entry-header:before,
article.sticky header.entry-header:after {
display: table;
content: "";
}
article.sticky header.entry-header:after {
clear: both;
} }
article.sticky .featured-post { article.sticky .featured-post {
float: right; float: right;
@ -1197,31 +1155,15 @@ article.format-quote .entry-content blockquote {
font-weight: normal; font-weight: normal;
} }
#comments article { #comments article {
zoom: 1;
margin: 24px 0; margin: 24px 0;
margin: 1.714285714rem 0; margin: 1.714285714rem 0;
} overflow: hidden;
#comments article:before,
#comments article:after {
display: table;
content: "";
}
#comments article:after {
clear: both;
} }
#comments article header { #comments article header {
position: relative;
zoom: 1;
margin: 0 0 48px; margin: 0 0 48px;
margin: 0 0 3.428571429rem; margin: 0 0 3.428571429rem;
} overflow: hidden;
#comments article header:before, position: relative;
#comments article header:after {
display: table;
content: "";
}
#comments article header:after {
clear: both;
} }
#comments article header img { #comments article header img {
float: left; float: left;
@ -1330,17 +1272,9 @@ a.comment-reply-link:hover {
margin: 1.714285714rem 0; margin: 1.714285714rem 0;
} }
#respond form p { #respond form p {
zoom: 1;
margin: 11px 0; margin: 11px 0;
margin: 0.785714286rem 0; margin: 0.785714286rem 0;
} overflow: hidden;
#respond form p:before,
#respond form p:after {
display: table;
content: "";
}
#respond form p:after {
clear: both;
} }
#respond form p.logged-in-as { #respond form p.logged-in-as {
margin-bottom: 24px; margin-bottom: 24px;
@ -1394,18 +1328,7 @@ label ~ span.required {
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
div.home-top, div.home-top,
div.home-middle { div.home-middle {
zoom: 1; overflow: hidden;
}
div.home-top:before,
div.home-top:after,
div.home-middle:before,
div.home-middle:after {
display: table;
content: "";
}
div.home-top:after,
div.home-middle:after {
clear: both;
} }
} }
div.home-top { div.home-top {
@ -1414,15 +1337,7 @@ div.home-top {
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
section.home-content { section.home-content {
zoom: 1; overflow: hidden;
}
section.home-content:before,
section.home-content:after {
display: table;
content: "";
}
section.home-content:after {
clear: both;
} }
section.home-content h1.entry-title { section.home-content h1.entry-title {
margin: 0 0 24px; margin: 0 0 24px;
@ -1443,15 +1358,7 @@ div.home-top {
} }
@media screen and (min-width: 600px) { @media screen and (min-width: 600px) {
.page-template-homepage-php #content { .page-template-homepage-php #content {
zoom: 1; overflow: hidden;
}
.page-template-homepage-php #content:before,
.page-template-homepage-php #content:after {
display: table;
content: "";
}
.page-template-homepage-php #content:after {
clear: both;
} }
} }
.page-template-homepage-php #secondary { .page-template-homepage-php #secondary {