-
Notifications
You must be signed in to change notification settings - Fork 267
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
Enable Carbon CSS custom properties #2016
Merged
Merged
Conversation
This file contains 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
Closed
AlanGreene
force-pushed
the
sass_reorg
branch
2 times, most recently
from
April 29, 2021 13:15
f37b33f
to
92c4127
Compare
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: skaegi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
tekton-robot
added
the
approved
Indicates a PR has been approved by an approver from all required OWNERS files.
label
May 4, 2021
Enable the Carbon CSS custom properties feature flag so we can more easily handle theming, including component-specific overrides as needed (e.g. log container). Replace some hard-coded background colours with the appropriate theme tokens so they're updated correctly to match the selected theme. Reorganise the SCSS imports so they're no longer loaded from the individual components' JS files. This is for a number of reasons: - support for the CSS custom properties - reduce duplicate styles in output (each JS import of a SCSS file results in a new SASS build context rendering the `import-once` useless) - give consumers more control over the styles loaded Update unit tests to account for Carbon changes in icon-only buttons and dropdowns (they only add title attribute when text is truncated) A future PR will introduce more easily consumable bundles of styles, for example the `PipelineRun` component currently requires the `TaskTree`, `Task`, `Step`, etc. styles to be loaded, so it would make sense to provide an easily consumable SCSS import to fulfill this.
/lgtm |
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.
Changes
Prereq for #1713
Enable the Carbon CSS custom properties feature flag so we can more
easily handle theming, including component-specific overrides as
needed (e.g. log container).
Replace some hard-coded background colours with the appropriate theme
tokens so they're updated correctly to match the selected theme.
Reorganise the SCSS imports so they're no longer loaded from the
individual components' JS files. This is for a number of reasons:
results in a new SASS build context rendering the
import-once
useless)
Update unit tests to account for Carbon changes in icon-only buttons
and dropdowns (they only add title attribute when text is truncated)
A future PR will introduce more easily consumable bundles of styles,
for example the
PipelineRun
component currently requires theTaskTree
,Task
,Step
, etc. styles to be loaded, so it wouldmake sense to provide an easily consumable SCSS import to fulfill this.
Preview of how it might look with the Carbon g90 theme:
Carbon g100 theme:
Additional work is required before this is enabled to decide on either the g90/g100 themes, ensure minimum contrast requirements are met for accessibility, ensure nav / log container boundaries are clear, etc.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.