You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I'm trying to make a theme for carbon but I started to face some issues as long as I want to modify something else then colors. In my case I wanted to modify button paddings and font weight.
I found that in @carbon\styles\scss\components\button\_vars.scss
We have those variables and few more:
/// @type Number
/// @access public
/// @group button
$button-font-weight: 400 !default;
/// @type Value
/// @access public
/// @group button
$button-padding: calc(0.875rem - 3px) calc(#{$spacing-10} - 1px)
calc(0.875rem - 3px) calc(#{$spacing-05} - 1px) !default;
I have checked with my VSC Search and manually all of the button related files like:
button.scss,
index.scss,
mixins.scss,
tokens.scss.
And i couldn't find any part of the code referring to those variables declared in that _vars.scss file.
I tried using them and the one I mention above are not getting any effect on my component, for example $button-border-radius works but this one is being used in mixins.scss so it makes sense that makes an effect. So i have 2 questions.
those are some code leftovers / something not implemented yet or they have some purpose I'm missing?
Is there way to modify button paddings without affecting overall $spacing global tokens?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey, I'm trying to make a theme for carbon but I started to face some issues as long as I want to modify something else then colors. In my case I wanted to modify button paddings and font weight.
I found that in
@carbon\styles\scss\components\button\_vars.scss
We have those variables and few more:
I have checked with my VSC Search and manually all of the button related files like:
And i couldn't find any part of the code referring to those variables declared in that
_vars.scss
file.I tried using them and the one I mention above are not getting any effect on my component, for example
$button-border-radius
works but this one is being used inmixins.scss
so it makes sense that makes an effect. So i have 2 questions.$spacing
global tokens?Beta Was this translation helpful? Give feedback.
All reactions