-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Remove all color() invocations #4636
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
Conversation
size-limit report
|
599d5f7 to
7a93f3d
Compare
alex-page
left a comment
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.
The only thing left is to remove the function. We could point this to the v8.0.0-major branch.
BPScott
left a comment
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.
The removal of the color-icon mixin is a breaking change to our public sass API - consumers used to be able to use that mixin and now it's gone. Up to y'all decide if that's acceptable in a minor release.
Personally I'd err towards trying to make sure these removal PRs occur in the main branch rather than a v8 branch (as then there will be fewer merge headaches in the future), but try to maintain backwards compatibility in minor versions - And thus leave the color-icon mixin hanging around, referencing the color function. Perhaps add a @deprecated docblock to color/color-icon, and have a follow-up PR that removes color/color-icon targeting a v8 branch.
Not blocking for this PR but an errant thought bouncing around my brain:
It'd be neat to remove the ability to use color() internally to make sure usage doesn't creep back in (unlikely with color, but possible for other functions that are due to become tokens). As alluded to earlier _public-api.scss is our public api, and removing items from that file or the files referenced therein is a breaking change. However we don't use that file internally. Internal sass API usage is done by importing _common.scss.
By removing the @import './foundation/colors'; from _common.scss then internal files would not have access to the functions used within it.
I think a bit of extra work is needed to get to that point - either removing the usage of the other functions defined in that file, or splitting the files up so some functions are only exposed via _public-api.scss. I'm not sure quite sure how that'd look off the top of my head, or if it'd be worth doing as you go or waiting till most of these functions have been converted to tokens.
alex-page
left a comment
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.
WHY are these changes introduced?
Fixes #4592
The
color()Sass function should not be used as it uses a deprecated color system. Replacing allcolor()invocations in favor of the up to date color system that uses custom css propertiesWHAT is this pull request doing?
Swapping
color()for equivalent css custom properties.Affected components
AppProviderMappedOptionsBadgeNavigationDualThumbHow to 🎩