-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore a .content class for broad margin changes and more #30177
Comments
I've been playing around with this lately, I came with a solution like this: |
Also related: #26716 |
@MartijnCuppens a few questions about this. Specificity Targets Values Something like this could do the job: .content > * + * {
margin-top: 1.5em;
} However I think it would be related to some kind of typographic scale, and for now it's not implemented this way in Bootstrap (since most values are kinda hardcoded in I'd love to see an incoming PS: please keep in mind that my three questions can be unrelated :) |
I don't know, at some point in my life, I thought that was a brilliant idea.
Definitely What do you think about removing the default margins form p tags and headings (and all other typographic elements)? Made a second POC here: https://codepen.io/MartijnCuppens/pen/dyoOGdd?editors=1100 Switching to
Ok, what's that? |
@MartijnCuppens Back to business 🎉 When using a typographic scale, every values are tight together depending on a single abitrary value: the ratio. For example, a base font size equivalent to 16px and a ratio of 2 will give the following scale: 16, 32, 64, 128, etc. That's conceptually pretty close to what a grid is for layout. This requires a few maths; there's tons of tools and documentation out there (recently, utopia.fyi, but you may find modularscale.com, type-scale.com, etc.). On the design part, this ratio gives underneath meaning to the graphic design: ratio gives type depth, increases or decreases visual hierarchy, and may echo to some kind of cultural background too. It's really meaningful. However it's not the common pattern, since a lot of graphic designers prefer to handle font-sizes "manually". From a Bootstrap's point of view, coupling font sizes with a type scale ratio may lead to side effects (first of those would be less configurable font sizes). You may find an example in Tachyons' type scale — they're using a 1.25 ratio. I'm not sure I'm clear enough: explaining this in French is really easier to me :D I love working this way, but I'm not sure it's suitable for Bootstrap. |
No problem, I understand what you mean @ffoodd. We could implement the ratio, but RFS will automatically rescale font sizes ignoring the ratio but keeping readability in mind. Anyway, my idea was to tackle spacing issues with the |
@twbs/css-review, what are your thoughts on removing the margins from elements by default and use the We use |
Seems reasonable, since those elements outside main content will likely to be in a custom layout (navbar, sidebar, footer…). So it makes sense, I guess. |
Capturing ideas from #29491 (comment).
The text was updated successfully, but these errors were encountered: