_s: Be more specific about clearing elements.

(Introduced in b1d3b53)

While class attribute selectors are very powerful and might help in
keeping stylesheets concise and easier to maintain, they don't work very
well with a project like WordPress. Not only can third-party scripts
insert and rely on specific class names that get picked up by attribute
selectors for common class names. But more importantly WordPress passes
category and tag slugs on to post classes, which can result in
unpredictible results.

Fixes #284, fixes #309.
This commit is contained in:
obenland 2013-09-12 13:11:38 +09:00
parent 6e80d01bd0
commit dff92a0e9e
1 changed files with 15 additions and 6 deletions

View File

@ -373,17 +373,26 @@ a:active {
/* Clearing */
.clear:before,
.clear:after,
[class*="content"]:before,
[class*="content"]:after,
[class*="site"]:before,
[class*="site"]:after {
.entry-content:before,
.entry-content:after,
.comment-content:before,
.comment-content:after,
.site-header:before,
.site-header:after,
.site-content:before,
.site-content:after,
.site-footer:before,
.site-footer:after {
content: '';
display: table;
}
.clear:after,
[class*="content"]:after,
[class*="site"]:after {
.entry-content:after,
.comment-content:after,
.site-header:after,
.site-content:after,
.site-footer:after {
clear: both;
}