How can I find out when to use -webkit-, -moz, -ms-, -o etc.?

How do I know when to use the prefix -webkit-, -moz-, -ms-, -o-in the properties css? I see a lot of "inconsistency" in some attributes, in some properties the programmer only sets -moz-, in the other he puts all 4. Is there a reason for this?

+4
source share
5 answers

Knowing which prefixes to use depends on which browsers you want to support. A good place to find out which browser versions require a prefix is caniuse.com .

This change is due to what other developers have decided to support. If you see more prefixes, the developers (site owner) of the site have decided a more / deeper level of support for older browsers. Fewer prefixes will support fewer browsers. And why? There can be many reasons, some of which are the target audience and performance requirements (web APIs).

You can follow the manual route, but many developers will use tools such as Autoprefixer or a CSS preprocessor like SASS or LESS . These tools give you various ways to determine which prefixes to use.

- AutoPrefixer , , , .. .

CSS, SASS LESS, mixin ( ), , .

+7

: ( / CSS).

http://shouldiprefix.com/, , "" ( " " ).

, CSS , , ( , , , , , ).

+4

" ": -moz-= Mozilla Firefox -ms-= Microsoft Internet Explorer -o-= Opera -webkit-= Google Chrome Apple Safari.

css, -, .

css, LESS, , . LESS , . , css .

, .

, : https://github.com/less/less-plugin-autoprefix

+1

, , , - , , :)

0

.

CanIUse, , CSS , , , , (.. -webkit-).

, Transform (CanIUse # Transform). , Android Browser 4.4 4.4.4 ? : " -webkit"? . -webkit- vendor.

, (, ). , CSS, CSS/SASS/LESS/etc, , .: P

, , . .

CSS.

0

Source: https://habr.com/ru/post/1674768/


All Articles