Skip to content

Allow unknown non-{}-block at-rules#2783

Merged
seven-phases-max merged 1 commit intoless:masterfrom
seven-phases-max:fix-unknown-atrules
Jan 26, 2016
Merged

Allow unknown non-{}-block at-rules#2783
seven-phases-max merged 1 commit intoless:masterfrom
seven-phases-max:fix-unknown-atrules

Conversation

@seven-phases-max
Copy link
Copy Markdown
Member

Fixes #2770.


This does not fix #2639 (i.e. non-block directives do not bubble).
(I suppose enabling bubbling for all unknown at-rules by default would be fine, so I was thinking of doing this in this PR too. But since I don't quite understand the bubbling implementation itself and can't perform any deeper debugging I guess I'll leave this modification for someone else (after all it's a bit beyond #2770 scope anyway and more a subject of #2639)).

seven-phases-max added a commit that referenced this pull request Jan 26, 2016
@seven-phases-max seven-phases-max merged commit fabccee into less:master Jan 26, 2016
@matthew-dean
Copy link
Copy Markdown
Member

I don't think unknowns should necessarily bubble. They're unknown. Someone may want them in the output at that location.

@seven-phases-max
Copy link
Copy Markdown
Member Author

Someone may want them in the output at that location.

Mmm... Yes, I guess no decision is possible to meet them all.
Technically the only two "standard" directives (@charset and @namespace) are subjects for bubbling (at least to not produce not-quite-valid-CSS when a plain css file is imported via nesting like in #2639). But all those whatever other non-block at-rules come from the pseudo-CSS languages (Polymer, PostCSS plugin dialects etc.) and there's no widely adopted pattern (E.g. @apply is a nested directive and should not be bubbled. Contrary most of such at-rules in PostCSS dialects are global only, thus they will expect them to bubble when they appear in wrapped imports).

@lukeapage
Copy link
Copy Markdown
Member

Nice change btw ;)

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.

Non-standard at-rules @custom-media directive fails

3 participants