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

Design tokens, config & theme.json - for discussion #439

Open
jackmakesthings opened this issue Mar 25, 2024 · 2 comments
Open

Design tokens, config & theme.json - for discussion #439

jackmakesthings opened this issue Mar 25, 2024 · 2 comments
Assignees

Comments

@jackmakesthings
Copy link
Contributor

jackmakesthings commented Mar 25, 2024

As WP keeps evolving, more and more of the tokens we've historically kept in a yaml config are now expected to be part of theme.json. We have scripts to convert some of these variables over, but it's increasingly feeling like we've created extra work here when we could just hand-edit theme.json. There are also still gesso utilities for things like side padding and container widths, which at this point are pretty well-landed in WP theme core. Meanwhile, core themes have lots of pre-baked patterns we could take advantage of, but currently tend to build from scratch.

I would be very interested to try starting a future WP project with one of the core themes as a base - twentytwentyfour presumably - instead of gesso. Based on the last few projects I've been on, I don't think it would cost us much time, and might even save time, especially if we lean into the core patterns & templates.

WP seems very committed to going forward with theme.json and block.json as core sources of truth, and I think it'd serve us well as a team to learn how to work with both. At this point, I'd argue that the Drupal and WP gesso authoring experiences are so different that there's less need to make them use the same tokens and utilities, compared to when they both ran on twig.

But I recognize this may not be everyone's opinion, and it could raise issues for support & for other devs inheriting the project, so let's discuss! Maybe there's some way to do an internal test project first.

@cssgirl
Copy link
Member

cssgirl commented Apr 10, 2024

Action items:

  • Remove design tokens, design tokens scripts + files
  • Utilize theme.json to replace the tokens with CSS variables
  • Go through theme source and remove design token refs, replace with new CSS variables

@cssgirl cssgirl self-assigned this Apr 10, 2024
@cssgirl
Copy link
Member

cssgirl commented May 16, 2024

In progress work: #444

@cssgirl cssgirl closed this as completed May 16, 2024
@cssgirl cssgirl reopened this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants