-
Notifications
You must be signed in to change notification settings - Fork 970
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
Enable CSS nesting syntax by default when using Tailwind #10116
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jtoar
reviewed
Mar 7, 2024
jtoar
approved these changes
Mar 7, 2024
jtoar
added a commit
that referenced
this pull request
Mar 8, 2024
The newish changelog workflow has personally saved me a lot of time and is half the reason we were able to release so many times on a moment's notice last week. But it's prone to merge conflicts, both in this repo and in the release tooling (most cherry picks from the main branch to the next branch had merge conflicts because of the changelog) so it's not going to scale out much more. But it's proved it's usefulness. I tried Changesets proper—seemed like the obvious choice and @ahaywood even independently came up with the idea—but it's overkill. I don't want to have to associate a semver with a PR (we use milestones for that). I also don't want to have to pick which packages we're versioning. Right now it's always all of them. And without the tooling or without using git, there's no obvious way to tie a changeset back to the PR that made it. (Maybe one of the changeset changelog packages do this, but config.) All I really want is what we're doing right now without the merge conflicts, so I spiked on a small script to generate a minimal changeset: ``` yarn changesets 10116 yarn changesets #10116 ``` The idea is that we'll do what we've been doing, but just via that command. It'll write a file to `.changesets/three-random-words.md`, and we'll put our release notes for the PR there. The release tooling can aggregate them into release notes at the time of release. The main con is that we can't see all the unreleased changes in linear order in one file. But tradeoffs. It's definitely worth not having to put up with merge conflicts.
ahaywood
pushed a commit
that referenced
this pull request
Mar 8, 2024
I don't think this plugin existed when we first created the Tailwind UI setup command, but it does now, and is super handy! This lets you use [nested CSS syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Using_CSS_nesting) in your `index.css` right after you install Tailwind. Trying to nest without this plugin seems to work in development, but you'll get a warning message in the console each time you save your `.css` file. ```css .button { @apply flex items-center px-4 py-2; .icon { @apply w-4 h-4; } span { @apply text-sm; } } ```
ahaywood
pushed a commit
that referenced
this pull request
Mar 8, 2024
The newish changelog workflow has personally saved me a lot of time and is half the reason we were able to release so many times on a moment's notice last week. But it's prone to merge conflicts, both in this repo and in the release tooling (most cherry picks from the main branch to the next branch had merge conflicts because of the changelog) so it's not going to scale out much more. But it's proved it's usefulness. I tried Changesets proper—seemed like the obvious choice and @ahaywood even independently came up with the idea—but it's overkill. I don't want to have to associate a semver with a PR (we use milestones for that). I also don't want to have to pick which packages we're versioning. Right now it's always all of them. And without the tooling or without using git, there's no obvious way to tie a changeset back to the PR that made it. (Maybe one of the changeset changelog packages do this, but config.) All I really want is what we're doing right now without the merge conflicts, so I spiked on a small script to generate a minimal changeset: ``` yarn changesets 10116 yarn changesets #10116 ``` The idea is that we'll do what we've been doing, but just via that command. It'll write a file to `.changesets/three-random-words.md`, and we'll put our release notes for the PR there. The release tooling can aggregate them into release notes at the time of release. The main con is that we can't see all the unreleased changes in linear order in one file. But tradeoffs. It's definitely worth not having to put up with merge conflicts.
jtoar
pushed a commit
that referenced
this pull request
Mar 8, 2024
I don't think this plugin existed when we first created the Tailwind UI setup command, but it does now, and is super handy! This lets you use [nested CSS syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Using_CSS_nesting) in your `index.css` right after you install Tailwind. Trying to nest without this plugin seems to work in development, but you'll get a warning message in the console each time you save your `.css` file. ```css .button { @apply flex items-center px-4 py-2; .icon { @apply w-4 h-4; } span { @apply text-sm; } } ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
fixture-ok
Override the test project fixture check
release:feature
This PR introduces a new feature
topic/generators-&-scaffolds
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't think this plugin existed when we first created the Tailwind UI setup command, but it does now, and is super handy!
This lets you use nested CSS syntax in your
index.css
right after you install Tailwind.Trying to nest without this plugin seems to work in development, but you'll get a warning message in the console each time you save your
.css
file.