Repository navigation
Keep article padding when a child has no-margin (fix #662) - #663
Merged
leonardorafael merged 2 commits intoNov 27, 2026
Merged
Conversation
leonardorafael
self-requested a review
November 27, 2026 14:38
Author
|
Yaaaa huuuu , Thanks for the review and merge, @leonardorafael! Happy to help with more BeerCSS issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
:has(> [class*='margin']) { padding: 0.1px }insrc/cdn/settings/reset.cssalso matchedno-marginchildren. Its specificity (0,1,0) beatarticle { padding: var(--_padding) }(0,0,1), so a card with ano-marginchild lost its padding and.roundcorners clipped the text.The selector is now
:where(:has(> [class*='margin']:not(.no-margin))). It skipsno-marginchildren, and:where()keeps specificity at (0,0,0) soarticle/ other components keep their own padding for other*-marginhelpers too. The 0.1px margin-collapse guard still applies to parents that have no padding of their own.Verified against the CodePen in the issue, plus
small-marginandtop-marginchildren.npm run testpassed (209 tests). Dist was not committed, per CONTRIBUTING.before-

after -

Fixes #662