When specifying a 0 value in CSS, should I explicitly mark the units or omit?

后端 未结 8 1188
旧巷少年郎
旧巷少年郎 2020-12-16 09:13

This is more of a \'philosophy\' argument, but I\'d like to know what the recommended practice here. I\'m not setting it up as a Wiki yet in case there is an \'official\' an

8条回答
  •  臣服心动
    2020-12-16 09:35

    The CSS specification says (quote):

    After a zero length, the unit identifier is optional.

    And I've read many times that it is suggested to omit the unit, I can't remember where.

    So omit them.

提交回复
热议问题