The use clearfix?

The crux of the matter is that I don't like this kind of:


Many foreign websites have seen that the use of fix is not appending the class to the element. That is, they are in the css add it to each element that needs the fix? or what?
September 19th 19 at 12:24
3 answers
September 19th 19 at 12:26
Solution
Need class just add the same css settings as clearfix.
.clearfix:before,
.clearfix:after {
 content: "";
 display: table;
}
.clearfix:after {
 clear: both;
}

.header:before,
.header:after {
 content: "";
 display: table;
}
.header:after {
 clear: both;
}

No this does not prohibit, in most frameworks practiced. When using preprocessors you can use the extend as you advised above.
This is understand the answer, thank you! - Ed.DuBuque61 commented on September 19th 19 at 12:29
September 19th 19 at 12:28
Yes, for example, is used in the preprocessor @extend:
sass-lang.com/documentation/file.SASS_REFERENCE.ht...
September 19th 19 at 12:30
So browse the sites and check who's stopping you?
Can either way as you prefer.

el:after{} /* */

Find more questions by tags HTMLCSS