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

Opt out of !important CSS rules generated from theme.json #37591

Closed
wants to merge 1 commit into from
Closed

Opt out of !important CSS rules generated from theme.json #37591

wants to merge 1 commit into from

Conversation

MarieComet
Copy link
Contributor

Proposed solution for #37590

Description

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 22, 2021
@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @MarieComet! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@aristath
Copy link
Member

At this stage, we want to avoid adding filters to the theme.json parser and global styles. That's not to say that filters will not be added, but we need to come up with a viable strategy. Perhaps there will be a single filter for the generated CSS, in which case that can be used to remove the !important strings all at once.
Let's not rush this until we have a better idea of how we'll be able to hook in those styles. Adding a bunch of filters for each scenario would not be an optimal solution and we need to find a way to make these hookable but abstract enough to be useful in more than one scenarios.

Copy link
Member

@oandregal oandregal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to what Ari shared, there's already ways to hook into these styles. I'll share more in the original issue.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants