4 ms·
Why do they use `::before` instead of `:before`? Is that a typo?
by nnq 13y ago
Why do they use `::before` instead of `:before`? Is that a typo?
- agr8man 13y agoThe double-colon notation is introduced in order to establish a discrimination between pseudo-classes and pseudo-elements. Doesn't work with IE.
- windsurfer 13y ago> Doesn't work with IE That's not true. IE has supported it since IE9 at least. http://msdn.microsoft.com/en-us/library/ie/cc304078%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/ie/cc304078%28v=vs.8...
- bzbarsky 13y agoPseudo-elements use two colons. A small number ("before", "after", "first-line", "first-letter") are grandfathered in as allowing either one or two, for backwards compat back to the days when there was no distinction between pseudo-elements and pseudo-classes in CSS.