chore: rename Theme to GlobalTheme#1702
Open
gregorw wants to merge 2 commits into
Open
Conversation
37ccfdf to
fed11bc
Compare
The reason for this is that Theme is a new v11 component that allows for inline theming. That’s a different purpose than this component has. In the standard Carbon implementation a GlobalTheme is used that matches the purpose of what this Svelte component used to do. The idea is to stick to the same name as the standard implementation.
Carbon Design System provides the idea of [inline theming](https://carbondesignsystem.com/guidelines/color/implementation/#how-inline-theming-works). As was mentioned in carbon-design-system#1648 the Carbon standard implementation is [documented here](https://react.carbondesignsystem.com/?path=/docs/components-theme--playground). It says: > The `GlobalTheme` and `Theme` components allow you to specify the theme for a page, or for a part of a page, respectively. `Theme` is most often used to implement inline theming where you can style a portion of your page with a particular theme. What this means for `carbon-components-svelte` is that we should rename the existing `Theme` component to `GlobalTheme`. This leads us a tiny bit closer to [feature parity with Carbon v11](carbon-design-system#1614) and gives room for a new component dedicated to v11 inline theming.
fed11bc to
67271b9
Compare
e7485c4 to
417102d
Compare
gregorw
added a commit
to gregorw/carbon-components-svelte
that referenced
this pull request
Jan 20, 2024
This fixes the current `Theme` component. Note that the canonical implementation uses `GlobalTheme` for the same concept. See carbon-design-system#1702. Static CSS files are updated to use @carbon/styles including fonts via CDN. (cherry picked from commit 50f24b8)
234c1f9 to
e774974
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Carbon Design System v11 provides the idea of inline theming. As was mentioned in #1648 the Carbon standard implementation is documented here. It says:
What this means for
carbon-components-svelteis that we should rename the existingThemecomponent toGlobalTheme. This leads us a tiny bit closer to feature parity with Carbon v11 and gives room for a new component dedicated to v11 inline theming.