-
Notifications
You must be signed in to change notification settings - Fork 10
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
Make set-type
margins optional
#141
Conversation
There are cases where we want to use the default typogrpahy, but not have margins.
As the components seeemingly have different margins, and the variants could also have different margins. I wonder if we should leave it to a component level to set margin, instead of abstracting it away? |
I do like that the
(See updated PR) |
I like this, do you think it'd would be even better if we allow I'm wondering as we're using CSS custom properties that we can reset it, as needed, at the component level. |
Do we need to set an |
Only thing I'd worry about doing But, updated the PR with your thoughts, so now it supports three states: passed variable, automatic/default, disabled. |
cool :) the idea is being employed in
|
Sounds good. I'm more than happy to defer to your judgement on how we should be setting/passing things around in the code, you've far more experience with the design/maintenance of 'em. |
There are cases where we want to use the default typography, but not have margins.
vf-badge
is a good example of this:The fix here is one approach, a few other options:
mixin set-type($font-size, $global-font-family: $global-font-family, $set-margins: true) {
margin: 0 0 var(--vf-text-margin--bottom, 16px) 0;
and then unset/addmargin-bottom: 0
(feels messy)The way I've gone in this PR feels like the most balanced approach, I think.