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
|
|
||
| - 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 |

It occurs to me this might need some
rfsmagic, 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-styleis 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