Skip to content

box-model rule not respecting box-sizing property #298

@jstrimpel

Description

@jstrimpel

We are using https://github.com/jzaefferer/grunt-css to add csslint to our build process. According to https://github.com/stubbornella/csslint/wiki/Beware-of-box-model-size:

"If the box-sizing property is specified, then the rule does not emit any warnings for the above conditions as it assumes you know what you're doing."

However, the CSS below is still throwing error box-model rule errors.

.pa-header {
box-sizing: border-box;
background: url('../images/bg_hdr_grad.gif') repeat-x;
height: 33px;
width: 982px;
border-top: #b2c5d3 1px solid;
border-right: #b2c5d3 1px solid;
border-left: #b2c5d3 1px solid;
}

[L6:C3]

Using height with border-top can sometimes make elements larger than you expect. Don't use width or height when using padding or border. (box-model)
[L7:C3]
Using width with border-right can sometimes make elements larger than you expect. Don't use width or height when using padding or border. (box-model)
[L8:C3]
Using width with border-left can sometimes make elements larger than you expect. Don't use width or height when using padding or border. (box-model)
Task "csslint:base_theme" failed. Use --force to continue.

Aborted due to warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions