N
N
name1e552018-06-21 21:07:38
css
name1e55, 2018-06-21 21:07:38

Vendor prefixes on one line?

Is it acceptable to markup like this:

::-moz-selection, ::selection {
    background-color: tomato;
}

Or just different lines:
::-moz-selection {
    background-color: tomato;
}

::selection {
    background-color: tomato;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Proskurin, 2018-06-21
@name1e55

The browser ignores the entire group of selectors if one of them is not valid. And for chrome, for example, ::-moz-selection will not be valid, which means the properties will not be applied.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question