body :not(i, [class=-icon], [class*=dashicons], ::before, ::after)
font-family: $font-family !important
…but this works
body :not(i, [class=-icon], [class=dashicons]),
body:not()::before,
body:not(*)::after
font-family: $font-family !important
Please add it to your article because there is no article about this issue.
]]>]]>
It’s selecting the before/after pseudo-elements for ALL elements. The * means “any tag”.
]]>}
what does it mean ?
]]>Hi teacher
Can I write html tags within before and after?
Yes, it does. Something like this:
a::before {
content: "";
/* other properties */
}
tag
does it work with it?
]]>It is pretty confusing, but there is indeed a difference. Both ::before
and ::after
are called pseudo-elements because they elements in and of themselves that are distinct but directly related to the element they are attached to.
I other words, .my-class::after
is very much an element like .my-class
and can be styled apart from it. Chris has an oldie but goodie on how they work and some interesting things you can do with them: https://css-tricks.com/pseudo-element-roundup/
I think you already knew the significance of :before & :after.
]]>e.g.
.className li::before {
}
Thanks
]]>I hope I will be able to code that successfully. Will ask for help here otherwise.
Thanks much,
Amitoj
Great answer, thanks!
]]>