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 */
|
||||
.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;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue