-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update: Remove duplicate style mappings from global styles #25145
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,11 @@ import { __ } from '@wordpress/i18n'; | |
/** | ||
* Internal dependencies | ||
*/ | ||
import { | ||
BACKGROUND_COLOR, | ||
LINK_COLOR, | ||
TEXT_COLOR, | ||
GRADIENT_COLOR, | ||
} from '../editor/utils'; | ||
import { LINK_COLOR } from '../editor/utils'; | ||
|
||
const BACKGROUND_COLOR = 'background-color'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't these variables be moved to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is fine to use background-color when needed. We are at the panel label so probably the panel should know the supports key is background-color. Moving the variables would only mean one uses BACKGROUND_COLOR instead of background-color which is not a big win. |
||
const GRADIENT_COLOR = 'background'; | ||
const TEXT_COLOR = 'color'; | ||
|
||
export default ( { | ||
context: { supports, name }, | ||
|
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.
Don't we move the link color prop as well?
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 link color is used on this file and the other file so it makes sense to keep it as is and share it.