Declaring a CSS class attribute with "-"?
Until your CSS is technically correct, what you see is the vendor prefix. The vendor prefix is โโused for non-standard or incompletely implemented W3C recommendation specifications. They are evident in some CSS3 specs that browsers are still in the process of being implemented.
Some examples: box-sizing
, transform
, transition
.
Some common prefixes
-
-moz-
for Firefox / Mozilla -
-webkit-
for Safari / Chrome -
-ms-
for IE / Edge -
-o-
for Opera -
-khtml-
for Konqueror
You may be wondering what the Mozilla Developer Network has to say about vendor prefixes.
Quote:
Browser vendors sometimes add prefixes to experimental or non-standard CSS properties, so developers can experiment, but changes to browser behavior don't break the code during the standardization process. Developers should wait to enable the unprefixed property until browser behavior is standardized.
source to share
These are experimental CSS attributes and not officially defined or supported. In your case, box-sizing
see the Browser Compatibility section on MDN.
Also, I don't think there is a browser that supports it -box-sizing
like you suggested -webkit-box-sizing
, either -moz-box-sizing
.
source to share