-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Easily add display headings with sass maps #26533
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
Conversation
|
Will this be possible with normal text utilities? #25832 |
scss/_variables.scss
Outdated
| $display3-weight: 300 !default; | ||
| $display4-weight: 300 !default; | ||
| $display-line-height: $headings-line-height !default; | ||
| $displays: ( |
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.
$displays: () !default;
$displays: map-merge($displays, ());|
Hi @MartijnCuppens, this solution would gives more settings and it works. My problem is that by having the definition for headings scattered into different files, instead of scoped to type.scss we would be making the codebase harder to contribute, code and maintain. What do you think? |
|
Hi @andresgalante, Would you move the |
|
Yes, you are right, all variables are define on variables and putting them within a map wouldn't make a difference than having them as variables outside the map. The map might be a bit harder to parse. |
mdo
left a comment
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.
You've removed several variables—that's a breaking change. You can likely rewrite the Sass map to include those variables rather than remove them outright.
|
I re-added the original display variables |
|
I'm not convinced anymore that this is a good idea (especially for v4). This technique is quite different from the way we handle things in other places, we're practically putting every property of the generated css in a sass map. I'm considering closing this, unless someone has a good argument to merge this. |
|
Let's punt on it and reimagine the typography in v5 to do it right. v5 shouldn't be sweeping changes, but an easy-ish upgrade path. I feel like stuff like this can be tackled then. Feel free to close if you still agree! <3 |
Fixes #26515.
Provides a way to easily add display headings with a sass map.