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

Prepare Tailwind config to be used within demosplan-core #294

Merged
merged 9 commits into from
Jun 15, 2023

Conversation

spiess-demos
Copy link
Contributor

@spiess-demos spiess-demos commented Jun 14, 2023

This PR changes the Tailwind config so that it includes "Preflight", the opinionated normalize of Tailwind. So, we can drop normalize in demosplan-core.

Also, it adds yarn build:css to the prepack steps, so that a complete tailwind build is always included in the package.

Lastly, it changes some util classes to be of the tailwind syntax, in preparation of them being dropped from demosplan-core.

⚠️ As the utility classes are already changed within the components, demos-europe/demosplan-core#1521 must also be merged.

- enable preflight (= reset/normalize)
- set everything important because preflight and other
  declarations are rendered within the same file,
  so we can either include tailwind at first (having
  arbitrary selectors overriding its utilities), or last
  (having its preflight declarations override stuff)
- add some tweaks where demosplan utility classes do not
  have their counterparts in tailwind
# Conflicts:
#	src/components/core/DpDataTable/DpTableRow.vue
Copy link
Contributor

@salisdemos salisdemos left a comment

Choose a reason for hiding this comment

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

Just one Question, not a concern.

extend: {}
extend: {
flexShrink: {
2: '2'
Copy link
Contributor

Choose a reason for hiding this comment

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

out of curiosity: Why that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

out of the box, tailwind supports flex-shrink 0 or 1. However in one place in demosplan we use flex-shrink: 2, and this is the official way of extending tailwind utility classes.

@spiess-demos spiess-demos enabled auto-merge (squash) June 15, 2023 15:30
@spiess-demos spiess-demos merged commit 0846a3e into main Jun 15, 2023
@spiess-demos spiess-demos deleted the f_T27594_tailwind_tweak_utilities branch June 15, 2023 15:32
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.

2 participants