-
Notifications
You must be signed in to change notification settings - Fork 478
Description
I'm curious about the reasoning for using the word "broken" in the definition of this rule. While I understand that setting something like the below could cause confusion to a newcomer to css, anyone who has experience will understand how the box-model works using the default box-sizing: border-box
.
/* Throws box-model warning */
.selector {
width: 89px;
height: 89px;
padding: 10px;
border: 1px solid #000;
}
By the definition of the CSS specification, this is not "broken." The padding and the border are intended to be included in the given width and height of the element, meaning that the .selector
element will be 100px
in width and height total.
Is the reasoning for this to remove the need for basic addition and subtraction? Or perhaps to assist newcomers in understanding how the box-model works by default?
My only issue with this rule is the wording; in the same way that the rule may assist those who are unfamiliar with the default box-model, it can hurt them by making them think that no browsers follow the spec correctly by default.