-
Notifications
You must be signed in to change notification settings - Fork 65
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
Documentation: Theme Compose #1139
Comments
My notes reading through the code and tests. The function is used when a widget is created within a parent widget's source.
The return value should be passed to the embedded widget's Benefit: For the widget author, prefixed classes can be written that will completely replace that class in the embedded widget. For the widget user, instead of writing a How it worksTLDR
Details
|
We have different use cases to consider hereWidget Authors
Theme Authors
/* loginForm.m.css with a submit button using `submit` prefix */
.submitRoot {
composes: root from './button.m.css';
}
.root .submitRoot {
/* overrides go here, nest under root selector for local specifity */
margin: 10px;
} Widget users
// with theme.compose use
classes: {
'@dojo/login-form': { submitRoot: [ myAdditionalClass ]}
}
// without theme.compose use
classes: {
'@dojo/unknown/button/type': { root: [myAdditionalClass ] }
} |
Widget AuthoringMany widgets embed imported widgets in their returned vdom. Often, changes must be made to the styling of these embedded widgets both to support its placement within the parent widget as well as supporting any stylistic changes users and theme authors may want to make. Using When to Use
|
Document the use of theme compose
The text was updated successfully, but these errors were encountered: