Why does `.caret` have a "content" attribute?
Created by: ssafejava
dropdowns.less#L19 has an attribute, content: ""
on .caret.
In the CSS 2.1 spec, content
is only used on pseudo elements. In the CSS3 Content spec, it's used in a few places on non-pseudo elements for the purposes of quoting, etc.
It doesn't seem to have any use here, doesn't affect visible styles, and causes problems with projects like html2canvas
. Setting content
on a non-pseudo element bleeds into calls to window.getComputedStyle(el, ":before")
(and :after
), leading the script to believe a pseudo element exists where it actually does not.
It would make sense to remove it.