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

Use palette generator conditionally #2003

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

IanDelMar
Copy link
Contributor

@IanDelMar IanDelMar commented Nov 6, 2022

Description

This PR updates the PostCSS configuration such that the plugin generating the color palette JSON file from the CSS file is only used when the current file's name contains the word "theme".

Motivation and Context

While it is sufficient to generate the plugin for the theme.css file only, for each npm run css the JSON file is generated for theme.css and for custom-editor-style.css.
If one wants to use the same PostCSS config for any other file - say a custom.css - the plugin is used as well. This probably creates edge cases where the actual color palette JSON is overwritten by the palette created from custom.css.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I pulled my branch from develop.
  • I am submitting my pull request to develop.
  • I have resolved any conflicts merging this pull request would create.
  • I have checked that there aren't other open Pull Requests for the same update/change.
  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • composer cs:check has passed locally.
  • composer lint:php has passed locally.
  • I have read the CONTRIBUTING document.

@bacoords bacoords added this to the Release 1.3.0 milestone Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants