-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Question]: How can I set the $base-font-size property with theming? #14392
Comments
Can you do |
Based on the code snippet you shared, it appears that you're on the right path. However, since a previous @use directive has already imported @carbon/layout, there's a conflict that needs to be addressed. To tackle this, you should adjust the order of your code like this: // Import the @carbon/layout directive before @carbon/themes
@use '@carbon/layout' with (
$base-font-size: 14px
);
@use 'carbon-components/scss/themes';
@use 'carbon-components/scss/theme' with (
$fallback: themes.$g10,
$theme: (),
);
// Continue with your previous @use directives and other styling rules...
|
Additionally, the layout module can be accessed through
These options should resolve the issue, please open a new issue if not. Thank you |
Question for Carbon
I'm trying to fine-tune carbon styles in my (angular) app. However, I'm unable to override the default 16px font size. I would like to set it to 14px.
When I try to use
@carbon/layout
and modify it like so (as mentioned in the docs):I get the following error:
This module was already loaded, so it can't be configured using "with"
.Is it possible to set the theme so that it accepts my overridden value?
Thanks in advance!
Code of Conduct
The text was updated successfully, but these errors were encountered: