i'm coding for fun but i got curious abot these webkits
can somebody explain for what is this used for, why he need to use webkit transform instead only transform ?
and why webki-keyframes ? somebody explains please
6 Replies
the
-webkit-
part is called a browser prefix. Browsers add(ed) features that sometimes aren't 100% according to spec, based on proposals, or have some other reason they need to be separated from the regular features, so they add that prefix. Basically, that syntax is saying "Use -webkit-transform, unless you support regular transform" because the transform
is below the -webkit-
version
it's just a way for browsers to implement things without causing incompatible implementations of not yet fully supported or fleshed out features
same deal for the keyframes thingon transform specifically browsers un-prefixed it around 2014. So it's not necessary anymore. But you'll still see this in a lot of old code and demos from back in ye olde CSS3 times
i think keyframe was also unprefixed around the same time
basically any time you see it, check caniuse, it'll tell you whether the prefix is still necessary
thanks guys ❤️ i;m really thankful
??
there was an old version of the flex box spec called
display: box;
here's the caniuse: https://caniuse.com/?search=flex