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

Refactor theme module as an extension of the css module #1928

Merged
merged 18 commits into from
Jul 13, 2024

Conversation

sebnitu
Copy link
Owner

@sebnitu sebnitu commented Jul 13, 2024

What changed?

To help reduce complexity and improve usability of the theme module, this PR refactors it to be an extension of the CSS module instead of maintaining it's own custom property map. Internally, that means theme no longer maintains it's own custom properties map, but instead it stores theme properties in css.$_variables. To allow this, css module has been made more flexible by allowing css.get and css.set to more directly access the contents of css.$_variables map.

Deprecated theme API

  • theme.get() replaced with css.get()
  • theme.log() replaced with css.log()
  • theme.$_themes usage replaced with css.$_variables

Additional changes

  • Fixed issue with broken watch npm scripts.
  • Fixed issue with section component not properly getting root style padding.

@sebnitu sebnitu added PR: refactor Next Related to the next branch labels Jul 13, 2024
@sebnitu sebnitu marked this pull request as ready for review July 13, 2024 05:02
@sebnitu sebnitu merged commit e070680 into next Jul 13, 2024
2 checks passed
@sebnitu sebnitu deleted the next-theme-extends branch July 13, 2024 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Next Related to the next branch PR: refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant