-
Notifications
You must be signed in to change notification settings - Fork 195
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
refactor(opacity checkerboard)!: refactor from component into commons #2350
Conversation
🚀 Deployed on https://pr-2350--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.01 MB*
Detailscolorhandle
colorslider
swatch
thumbnail
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
mod file is currently not generating mods for opacity checkerboard, this is being addressed in #2322 |
@@ -105,7 +120,7 @@ | |||
|
|||
/* Visually hidden "range" input field */ | |||
.spectrum-ColorSlider-slider { | |||
opacity: 0; | |||
opacity: 0%; |
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.
style lint wants opacities in %
@Westbrook I'd be curious to get your thoughts on this refactor. I know this was implemented differently in SWC (not a component) vs. how we have it in our repo (a "component"). What level of churn (if any) would this cause for you all? |
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.
I'm not sure the right path for continued consumption of this approach in SWC without seeing the actual published code. For us to ship it as we have it needs to be staic somewhere in the output, separate from the consuming patterns.
Things that I do know:
- using CSS preprocessing means that there are multiple definitions of the CSS that can be shipped to users, rather than a single copy.
- we do have users that leverage the Opacity Checkerboard outside of the Spectrum elements
- the stand alone class was a useful way to support normalization across the consumption of this in both Spectrum patterns and Adobe apps and features at large.
@pfulton and @Westbrook I think based on the fact that people are using this outside of Spectrum elements steers me towards a more simple approach. I'll look at simplifying the CSS if I can and documenting inclusion order more clearly. I think this could be a good option to be more of "utility class" like we are looking at with background layers. |
Description
BREAKING CHANGE - would require removing a component
Refactors Opacity Checkerboard from a component to be with in
components/commons/opacity-checkerboard.css
this addresses concerns around inclusion order overwriting css values (#2139) and simplifies opacity checkerboard.Alternative solution to the GitHub issue: move css unnecessary to implement the background pattern, specifically
inline-size
,block-size
from theindex.css
and add to inline styling for the component docs site and storybook.How and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
Docs Site
Opacity Checkerboard should appear correctly on:
--mod-opacity-checkerboard-position
with in colorhandle)Storybook
Opacity Checkerboard should appear correctly on:
Regression testing
Validate:
Screenshots
To-do list