forked from mirror/_s
_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:
parent
6e80d01bd0
commit
dff92a0e9e
21
style.css
21
style.css
|
@ -373,17 +373,26 @@ a:active {
|
||||||
/* Clearing */
|
/* Clearing */
|
||||||
.clear:before,
|
.clear:before,
|
||||||
.clear:after,
|
.clear:after,
|
||||||
[class*="content"]:before,
|
.entry-content:before,
|
||||||
[class*="content"]:after,
|
.entry-content:after,
|
||||||
[class*="site"]:before,
|
.comment-content:before,
|
||||||
[class*="site"]:after {
|
.comment-content:after,
|
||||||
|
.site-header:before,
|
||||||
|
.site-header:after,
|
||||||
|
.site-content:before,
|
||||||
|
.site-content:after,
|
||||||
|
.site-footer:before,
|
||||||
|
.site-footer:after {
|
||||||
content: '';
|
content: '';
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
|
|
||||||
.clear:after,
|
.clear:after,
|
||||||
[class*="content"]:after,
|
.entry-content:after,
|
||||||
[class*="site"]:after {
|
.comment-content:after,
|
||||||
|
.site-header:after,
|
||||||
|
.site-content:after,
|
||||||
|
.site-footer:after {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue