Why isn't it possible to combine vendor-specific pseudo-elements/classes into one rule set?

前端 未结 2 1277
离开以前
离开以前 2020-11-22 07:28

In CSS it is possible to style placeholder text within an input using a combination of vendor-specific pseudo-classes and pseudo-elements (to get the best cross

2条回答
  •  悲哀的现实
    2020-11-22 08:05

    The specs say that if a user agent doesn't recognize part of a selector, it has to ignore the whole selector and its block.

    http://www.w3.org/TR/css3-syntax/#rule-sets

    The selector (see the Selectors module [SELECT]) consists of everything up to (but not including) the first left curly brace ({). A selector always goes together with a {}-block. When a user agent can't parse the selector (i.e., it is not valid CSS3), it must ignore the {}-block as well.

提交回复
热议问题