Should HTML “buttons” have the same box-model as everything else?

前端 未结 1 1278
自闭症患者
自闭症患者 2021-01-27 01:19

Referring to both the button element and the input element with a type of button, I ran across a behavior I think is a bug (i

相关标签:
1条回答
  • 2021-01-27 01:52

    Apparently this bug has already been reported to Chrome and Firefox. The loophole is that in both cases these elements have an initial value of box-sizing: padding-box set in their browser stylesheets. So it's not technically a default value (initial != default). However, the only way to revert these elements back to box-sizing: content-box is using proprietary browser extensions for content-box, so there is not any truly CSS compliant way to do this. box-sizing doesn't exist for CSS 2.1, and proprietary browser extensions are not valid CSS 3.

    0 讨论(0)
提交回复
热议问题