Skip to content

Add arbitrary-variants section in arbitrary-values #1378

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

Merged
merged 2 commits into from
Oct 14, 2022

Conversation

Sleepful
Copy link

@Sleepful Sleepful commented Oct 7, 2022

When reading the section on arbitrary variants it is difficult to know that there are documents for arbitrary variants, which are very relevant. arbitrary variants are a little hidden, under a title that doesn't mention anything about CSS selectors, therefore this PR: Adds a link to the related content.

I added this right after ### Arbitrary properties because it is almost as essential, and I added it before ### Handling whitespace given that white space is a CSS selector and the order of question tends to be:

  1. How do I add a custom selector?
  2. How do I add the specific white space (descendant) selector?

@vercel
Copy link

vercel bot commented Oct 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
tailwindcss-com ✅ Ready (Inspect) Visit Preview Oct 14, 2022 at 1:23PM (UTC)

@@ -116,9 +116,13 @@ This can be useful for things like CSS variables as well, especially when they n
</div>
```

### Arbitrary variants

In the same vein as arbitrary values, **arbitrary variants** allow you to write custom CSS selector modifiers, please refer to [arbitrary variants](/docs/hover-focus-and-other-states#using-arbitrary-variants).
Copy link
Author

Choose a reason for hiding this comment

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

I added the bold here because it's easy to gloss over the words given how similar they are to arbitrary values.

@adamwathan
Copy link
Member

Thanks! Made a couple of tweaks but I think it's good to surface this here for sure.

@adamwathan adamwathan merged commit f29b64e into tailwindlabs:master Oct 14, 2022
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