-
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
Fix the theme middleware to deal with the compose scenarios #940
Conversation
This pull request has been deployed to:
|
da306f2
to
d6741dc
Compare
This pull request has been deployed to:
|
1 similar comment
This pull request has been deployed to:
|
d6741dc
to
8c0f06f
Compare
This pull request has been deployed to:
|
This pull request has been deployed to:
|
…efix is specified
This pull request has been deployed to:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have worked this through the scenarios i'm aware of and all appears to be working now
* Fix the theme middleware to deal with the compose scenarios * remove accidental css import * support variant prefixes overriding the original class in base * Use variable for THEME_KEY * Correct types * Reference variable of CSS_THEME not the string literal * remove composes of widget variants as they will fallback to the default base theme * Do not require prefixed classes to compose from the child * put back grid composes * remove unused var * Upgrade deps and add empty css declarations * Fix scenario of adding classes for prefixed class names * Do not pass matching classes down that do not have a prefix when a prefix is specified
Type: bug
The following has been addressed in the PR:
theme.compose
like thisDescription:
Update
theme
middleware to support default variant themes without requiring the use ofcomposes
for the default base theme in the variant css.This will enable both the
root
andextra
classes to be themed by targeting the variants key, for example:classes
for both the variant and base cssThis will result in a theme objected constructed that includes the extra root class from
@dojo/widgets/variant
and the extra root class for@dojo/widgets/base
will be applied in the base widgetWhen passing
base
as theprefix
will use thevariant_prefix_theme_root
class as the base widget'sroot
class.When a prefix is specified, only prefixed classes will be composed for the child's theme. It will not pass the class for an
active
class, even if theactive
class exists in the child's css.Note: Changes the API to automatically create the composed
theme
to be passed to the base widget'stheme
property by the user. This saves the user have to constructed the theme every time.Example Usage: