Repository navigation
feat(material/core): add option to configure prefix of system variables - #29139
Merged
mmalerba merged 1 commit intoJun 5, 2024
Merged
Conversation
konstantindenerz
marked this pull request as ready for review
May 29, 2024 15:01
konstantindenerz
requested review from
andrewseguin,
devversion,
jelbourn and
mmalerba
as code owners
May 29, 2024 15:01
konstantindenerz
marked this pull request as draft
May 29, 2024 18:58
konstantindenerz
force-pushed
the
feature/configurable-system-prefix
branch
from
May 29, 2024 19:10
b9418ca to
a135c99
Compare
konstantindenerz
marked this pull request as ready for review
May 29, 2024 19:13
konstantindenerz
force-pushed
the
feature/configurable-system-prefix
branch
from
May 29, 2024 19:19
a376c29 to
5873704
Compare
konstantindenerz
force-pushed
the
feature/configurable-system-prefix
branch
from
May 30, 2024 06:42
5873704 to
d9f1ac8
Compare
mmalerba
approved these changes
Jun 4, 2024
mmalerba
left a comment
Contributor
There was a problem hiding this comment.
Nice! I think people will find this useful
konstantindenerz
force-pushed
the
feature/configurable-system-prefix
branch
from
June 5, 2024 15:53
d9f1ac8 to
592ff89
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The component tokens (CSS variables) can reference the system variables abstraction with the configuration use-system-variables at the color and typography options level.
With this PR, you can replace the
--sys-prefix with, for example,--md-sys-. This makes it more flexible to adopt your own tokens, which are based on the Material 3 naming scheme but include a custom design system prefix, e.g.,--labs-sys-. This saves additional mapping.Demo configuration:
I made a small optimization to the map with the tokens, as the key and value were the same and only the --sys- prefix was added.
The result:
