-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Add @prefix at-rule for prefixing classes
#100
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
Conversation
|
I love this idea, this would also close #92! Also, why use an at-rule rather than a configuration option? |
|
Maybe have both? |
Right now the config file doesn't contain any real "settings" or anything so to speak; it's more of a style guide or a definition of your design system. Adding this there would make it the first time we've added that sort of configuration to that file and I'm not convinced I want to start mixing those two types of configuration in the same place. Open to discussing it though; it would likely affect #99 as well, and any other proposals about "settings" like this, like tailwindlabs/discuss#27. |
|
Mixing the style stuff with possible setting might indeed not be a good idea. |
|
A different setting could be to control the format of the responsive prefixes (like mentioned in tailwindlabs/discuss#27), but also to choose whether to use that as a prefix or suffix. Maybe settings to control LTR/RTL stuff. |
|
After a bunch of discussion I think we're going to do this in the config file. Gonna let this hang open until we get that implemented though. |
|
Closing this in favor of the config-based approach in #183. |
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request. ### What changed? #### ✳️ dedent (1.6.0 → 1.7.0) · [Repo](https://github.com/dmnd/dedent) · [Changelog](https://github.com/dmnd/dedent/blob/main/CHANGELOG.md) <details> <summary>Release Notes</summary> <h4><a href="https://github.com/dmnd/dedent/releases/tag/v1.7.0">1.7.0</a></h4> <blockquote><h2 dir="auto">What's Changed</h2> <ul dir="auto"> <li>docs: cleaned up README.md badges by <a href="https://bounce.depfu.com/github.com/JoshuaKGoldberg">@JoshuaKGoldberg</a> in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/100">#100</a> </li> <li>feat: add alignValues option by <a href="https://bounce.depfu.com/github.com/PaperStrike">@PaperStrike</a> in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/102">#102</a> </li> <li>1.7.0 by <a href="https://bounce.depfu.com/github.com/JoshuaKGoldberg">@JoshuaKGoldberg</a> in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/103">#103</a> </li> </ul> <h2 dir="auto">New Contributors</h2> <ul dir="auto"> <li> <a href="https://bounce.depfu.com/github.com/PaperStrike">@PaperStrike</a> made their first contribution in <a href="https://bounce.depfu.com/github.com/dmnd/dedent/pull/102">#102</a> </li> </ul> <p dir="auto"><strong>Full Changelog</strong>: <a href="https://bounce.depfu.com/github.com/dmnd/dedent/compare/v1.6.0...v1.7.0"><tt>v1.6.0...v1.7.0</tt></a></p></blockquote> <p><em>Does any of this look wrong? <a href="https://depfu.com/packages/npm/dedent/feedback">Please let us know.</a></em></p> </details> <details> <summary>Commits</summary> <p><a href="https://github.com/dmnd/dedent/compare/ab2ce25762a6ad0c26c563075f87c74427092d02...dd15cf58368b9842a256425a0f24cd7f8fd3df68">See the full diff on Github</a>. The new version differs by 3 commits:</p> <ul> <li><a href="https://github.com/dmnd/dedent/commit/dd15cf58368b9842a256425a0f24cd7f8fd3df68"><code>1.7.0 (#103)</code></a></li> <li><a href="https://github.com/dmnd/dedent/commit/304d0fc79567ef62da296b213525589ade7a711e"><code>feat: add alignValues option (#102)</code></a></li> <li><a href="https://github.com/dmnd/dedent/commit/aab442c691ba3608a5401df57b5e817533c9eed0"><code>docs: cleaned up README.md badges (#100)</code></a></li> </ul> </details> ---  [Depfu](https://depfu.com) will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with `@depfu rebase`. <details><summary>All Depfu comment commands</summary> <blockquote><dl> <dt>@depfu rebase</dt><dd>Rebases against your default branch and redoes this update</dd> <dt>@depfu recreate</dt><dd>Recreates this PR, overwriting any edits that you've made to it</dd> <dt>@depfu merge</dt><dd>Merges this PR once your tests are passing and conflicts are resolved</dd> <dt>@depfu cancel merge</dt><dd>Cancels automatic merging of this PR</dd> <dt>@depfu close</dt><dd>Closes this PR and deletes the branch</dd> <dt>@depfu reopen</dt><dd>Restores the branch and reopens this PR (if it's closed)</dd> <dt>@depfu pause</dt><dd>Ignores all future updates for this dependency and closes this PR</dd> <dt>@depfu pause [minor|major]</dt><dd>Ignores all future minor/major updates for this dependency and closes this PR</dd> <dt>@depfu resume</dt><dd>Future versions of this dependency will create PRs again (leaves this PR as is)</dd> </dl></blockquote> </details> Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
This PR adds a new custom
@prefixat-rule which works as a decorator for prefixing any nested class definitions:This makes it easy to generate all of Tailwind's utilities with a user-provided prefix to avoid collisions with any existing CSS they are using