-
-
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
v5: Add .fs-* utilities for font-size and rename font-weight/-style utilities #30571
Conversation
Just add
Since RFS already rescales the font sizes, I don't think there's any need for this.
Yup, I think it can be quite confusing that the margin of It might be better to work with $font-sizes: (
"xs": .75rem,
"sm": .875rem,
"md": 1rem,
"lg": 1.25rem,
"xl": 1.5rem,
"xxl": 2rem
) !default; |
I've been avoiding new classes that mix with our breakpoints notation to see if we can clear up "scales". I chose this approach since it maps 1:1 with our |
Naming is pretty hard here, my two cents:
We could stick with numbers (like spacers) but it wouldn't match headings hierarchy anymore: but should it? Thinking out loud for now, but there's more to be done I guess. |
Going to hold on this for now with that last comment. I'm wondering if we can build a single type scale system (GitHub/Primer does |
Decided against the above. Let's leave the display classes as-is. v6 can tackle a single set of font-sizes if we still want it. Just rebased and resolved the conflicts here. This should be ready for review now! |
@mdo this needs to move the migration section to alpha3 :) |
I propose to name new classes as shortcuts in emmet: |
- Adds new font-sizes Sass map - Generates six new classes for setting only font-size - Updates docs to mention this, including a scss-docs reference
- Make .fs-* utils for font-size use RFS - Rename .font-weight-* utils to .fw-* - Rename .font-style-* utils to .f-* - Update order of utilities a bit - Update docs to match
… to the appropriate section in Migration guide
@@ -21,10 +21,22 @@ toc: true | |||
|
|||
- Introduce `$enable-smooth-scroll`, which applies `scroll-behavior: smooth` globally—except for users asking for reduced motion through `prefers-reduced-motion` media query. [See #31877](https://github.com/twbs/bootstrap/pull/31877) | |||
|
|||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: XhmikosR <[email protected]>
It occurs to me this might need some
rfs
magic, but I'm unsure how to add that right now to the utilities file. Also, should these be responsive so folks can do.fs-md-3 .fs-lg-4
? I'm thinking not given obvious file bloat.Also makes me think
.font-weight-*
utilities should be shortened to.fw-*
..font-style
is obviously trickier... could remap to.text-*
or.font-*
?Fixes #25832.
https://deploy-preview-30571--twbs-bootstrap.netlify.app/docs/5.0/utilities/text/#font-size