Skip to content
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

Idea: Style migrations #24219

Open
ockham opened this issue Jul 27, 2020 · 1 comment
Open

Idea: Style migrations #24219

ockham opened this issue Jul 27, 2020 · 1 comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Package] Base styles /packages/base-styles [Type] Enhancement A suggestion for improvement.

Comments

@ockham
Copy link
Contributor

ockham commented Jul 27, 2020

Is your feature request related to a problem? Please describe.
When SASS variable definitions are renamed or replaced by others (e.g. #23202, #23648), projects that rely on them (via @wordpress/base-styles) need to manually track them down and update them accordingly. Example: Automattic/wp-calypso#42835

Describe the solution you'd like
It'd be cool if we could include a set of migrations with Gutenberg (e.g. in @wordpress/base-styles or @wordpress/scripts) that allow to run a script on a codebase to update these variables (at least for simple cases). Think database migrations -- there's a script that updates an exisiting database schema to a newer version, based on a set of files that specify what to replace with what.

Maybe there's a SASS parser out there somewhere that allows doing something like that. Alternatively, a sed or awk based script might do the trick.

cc/ @sirreal @jasmussen

@ockham ockham added [Tool] WP Scripts /packages/scripts CSS Styling Related to editor and front end styles, CSS-specific issues. labels Jul 27, 2020
@jasmussen
Copy link
Contributor

I wanted to note that the two PRs you've pointed to are not going to be happening often, or maybe at all, going forward. They are massive surgery updates that were necessary to improve code quality in light of the design changes 5.5 is going through. There will be hopefully just one more PR in this vein, to retire the remaining "old" colors, at which point we should reach a point of stability, with vastly fewer colors overall. There are some open questions about the naming of those colors, though — so that would make it two PRs.

The idea definitely makes sense, just wanted to share the context to frame how rare I hope these changes will be.

@gziolo gziolo added [Package] Base styles /packages/base-styles and removed [Tool] WP Scripts /packages/scripts labels Oct 14, 2020
@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Package] Base styles /packages/base-styles [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants