-
Notifications
You must be signed in to change notification settings - Fork 64
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
"Extending" Themes #277
Comments
I believe that in this situation you would take the example /* base/theme.ts */
import * as textInput from './textInput.m.css';
import * as button from './button.m.css';
export default {
textInput,
button
}; /* custom/theme.ts */
import * as textInput from '../base/textInput.m.css'; // use base textInput theme
import * as button from './button.m.css'; // use custom button style
export default {
textInput,
button
}; /* custom/button.m.css */
.root {
/* use root class from base theme */
composes 'root' from '../base/button.m.css';
}
.text {
/* provide new text class */
color: red;
} |
Thanks for the explanation @tomdye. I like the idea of exporting a custom theme that either explicitly exports base component styles as-is, or exports custom styles that use I think this information should be captured in a tutorial. Action items:
|
User Story
As a developer, I need a clear pattern for extending themes, taking an existing theme and adding additional widget classes, additional styles to widgets, and potentially overriding some of the theme styles.
Specific Use Case
I have a corporate theme which has been provided. Our project requires that we add/adjust some of the styles for our project, therefore I need to extend that base theme. I do not expect to utilise
!important
to achieve this.The text was updated successfully, but these errors were encountered: