M
M
mx60012015-08-14 10:08:11
css
mx6001, 2015-08-14 10:08:11

Why write the same CSS property for every browser?

I often see entries of the following nature:
-webkit-transition: opacity 0.5s ease;
-moz-transition: opacity 0.5s ease;
-o-transition: opacity 0.5s ease;
transition: opacity 0.5s
I took the property transition and opacity as an example, I'm wondering why list -webkit, -moz, -o when the last (just transition) property is supported by all of the above browsers? I would also understand if the values ​​​​for each browser would be different, but if it is the same ...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Evgeny Elchev, 2015-08-14
@mx6001

The bottom line is that often new features appear in browsers with vendor prefixes, and only in later versions support without a prefix appears, so for such old versions they are added. By the way, some fresh properties can even support the latest versions of browsers only with prefixes. So it's up to you to add prefixes or not. If you use sass, you can create mixins for automation.

A
Alexey Ukolov, 2015-08-14
@alexey-m-ukolov

the last (just a transition) property - do all of the above browsers support it?

If this were true, then indeed, there would be no point in specifying vendor prefixes. But it's not.
caniuse.com/#feat=css-transitions Deciding
whether or not to use vendor prefixes depends on the project and the minimum supported browser versions.
PS Today there was already a question on this subject.

Z
zooks, 2015-08-14
@zooks

This is a fallback for older versions of browsers. The property is written last without prefixes so that it overlaps the rest.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question