Skip to content

Box-model rule now honors box-sizing on the universal selector#797

Open
patrickkettner wants to merge 1 commit into
CSSLint:masterfrom
patrickkettner:universal-box-sizing
Open

Box-model rule now honors box-sizing on the universal selector#797
patrickkettner wants to merge 1 commit into
CSSLint:masterfrom
patrickkettner:universal-box-sizing

Conversation

@patrickkettner

Copy link
Copy Markdown

When the universal selector declares box-sizing (e.g. * { box-sizing: border-box; }, or the common *, *:before, *:after group), the box-model rule no longer warns about width or height used with padding or border, since the declaration applies to all elements.

To make this work regardless of where the universal rule appears in the stylesheet, warnings are collected during parsing and reported on endstylesheet (the same pattern the overqualified-elements rule uses). Qualified or scoped universal selectors (*.foo, div *) do not suppress the warnings.

dist/ is intentionally not rebuilt to keep the diff reviewable (a fresh build also stamps the current year into the banner and regenerates bundled parserlib whitespace unrelated to this change). Happy to regenerate it if preferred.

Fixes #243

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect broken box-sizing warning

1 participant