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

Tailwind package setup #8003

Merged
merged 17 commits into from Feb 27, 2022
Merged

Tailwind package setup #8003

merged 17 commits into from Feb 27, 2022

Conversation

stevedya
Copy link
Contributor

@stevedya stevedya commented Feb 16, 2022

Relates to #7981. This is a basic setup of tailwind css to generate utility styles. We may want to merge along with #7978 in order to have the tailwind configuration appropriately configured for wagtail's design system.

@squash-labs
Copy link

squash-labs bot commented Feb 16, 2022

Manage this branch in Squash

Test this branch here: https://stevedyatailwind-setup-3dr5r.squash.io

@stevedya stevedya self-assigned this Feb 16, 2022
@stevedya stevedya changed the title Draft:Tailwind package setup Tailwind package setup Feb 16, 2022
client/scss/core.scss Outdated Show resolved Hide resolved
tailwind.config.js Outdated Show resolved Hide resolved
docs/contributing/css_guidelines.rst Outdated Show resolved Hide resolved
.stylelintrc.js Outdated Show resolved Hide resolved
@stevedya stevedya mentioned this pull request Feb 17, 2022
.stylelintrc.js Show resolved Hide resolved
client/scss/core.scss Show resolved Hide resolved
client/webpack.config.js Show resolved Hide resolved
tailwind.config.js Outdated Show resolved Hide resolved
tailwind.config.js Outdated Show resolved Hide resolved
docs/contributing/css_guidelines.rst Outdated Show resolved Hide resolved
Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

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

@stevedya there are two big things I don’t see here and we’ll need to make a plan for, either in this PR or out:

  • How the Tailwind theme interacts with Sass – do we generate variables, use the built-in theme, or a custom version of that
  • How we do logical properties in CSS (we’ll completely disallow this in stylesheets, so ideally would want the same restriction in utility classes).

Additionally for this PR:

  • I think you should change at least one template to use Tailwind utility classes. I’d recommend the styleguide’s base.html
  • I would like us to remove some of Wagtail’s existing utilities if they have clear Tailwind equivalents where there would be no possible backwards compat issues (u-text-weight-normal, u-text-transform-uppercase, u-hidden seem like clear candidates. Perhaps visuallyhidden).

tailwind.config.js Show resolved Hide resolved
@thibaudcolas thibaudcolas added this to the 2.17 milestone Feb 27, 2022
Copy link
Member

@thibaudcolas thibaudcolas left a comment

Choose a reason for hiding this comment

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

Thank you @stevedya! I had to re-add the design tokens integration to make sure this was working, and swapped to Tailwind classes in two templates. Nice one!

For the other things I had mentioned, I’ll create follow-up tickets.

@thibaudcolas thibaudcolas merged commit 3bf9b65 into wagtail:main Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants