This repository was archived by the owner on Feb 4, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
Vertical rhythm #139
Copy link
Copy link
Open
Description
Currently collapsing margins could mess up with distances.
To prevent those possible inconsistent dimension, sizes and distances, vertical-rhythm with single direction margin's does a great job and visually feels like a Wiener Walzer.
Feature Request:
- Cross-Browser friendly
- Responsive
- No unexpected distances (eliminate collapsing margins)
-
vertical-rhythmprinciple - the Goal is that we end up with simple blocks which can be stacked or aligned in a row - Markup generated by WYSIWYG-Editor should be considered
- Typography's line-height (single and multi line)
Collapsing Margins:
Those are one of the main cause of our style issues, like:
- layout - e.g. distance to other nodes
- dimension - e.g. parent eats child's margin and thus does not grow
- backgrounds - e.g. hence parents eats margin, backgrounds get clipped
You can find a detailed explanation of why they happen here https://css-tricks.com/what-you-should-know-about-collapsing-margins/
Proposed Solution:
- Margins go always only in one direction (up or down)
- Each Component has a wrapping element which defines it's distance to others through
padding(cause paddings do not collapse)
In BEM words:
- Blocks do not use
margin, justpadding,border, etc. - Only elements do use
margintoo, but only in one direction
Great ressources
Metadata
Metadata
Assignees
Labels
No labels