No description
Find a file
Robin Malfait 8e97a48357
Discard invalid classes such as bg-red-[#000] (#13970)
* add test that verifies that parsing `bg-red-[#0088cc]` should not work

* improve parsing of arbitrary values, root is known

When using arbitrary values such as `bg-[#0088cc]` then we know that
everything before the `-[` part is the `root` of the utility. This also
means that this should exist in the design system as-is.

If we use `findRoot` instead, it means that `bg-red-[#0088cc]` would
also just parse fine and we don't want.

* small refactor: define `important` and `negative` directly

It's not necessary to track state in a state object. Let's use the
variables directly.

* small refactor: use return on same line for consistency

* add test that verifies that parsing `bg-` should not work

* move `value === ''` check up

The value doesn't change anymore, which means we can discard early and
don't need to start creating candidate objects.

* adjust comment with example

* update changelog
2024-07-10 10:01:23 +02:00
.github Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
crates Prep next release: 4.0.0-alpha.17 (#13951) 2024-07-04 19:08:10 +02:00
packages Discard invalid classes such as bg-red-[#000] (#13970) 2024-07-10 10:01:23 +02:00
playgrounds Bump dependencies (#13741) 2024-05-25 14:43:59 +02:00
scripts Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
.gitignore Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
.npmrc introduce v4 codebase 2024-03-05 14:29:15 +01:00
.prettierignore Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
Cargo.lock remove Rust benchmarks and fixtures (#13335) 2024-03-23 16:16:40 +01:00
Cargo.toml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
CHANGELOG.md Discard invalid classes such as bg-red-[#000] (#13970) 2024-07-10 10:01:23 +02:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Bump dependencies (#13738) 2024-05-24 15:07:44 +02:00
pnpm-lock.yaml Bump dependencies (#13741) 2024-05-25 14:43:59 +02:00
pnpm-workspace.yaml Hoist oxide/crates to just crates (#13333) 2024-03-23 09:00:48 -04:00
README.md Copy README file to every package (#13096) 2024-03-06 08:49:31 -05:00
turbo.json introduce v4 codebase 2024-03-05 14:29:15 +01:00
vitest.workspace.ts introduce v4 codebase 2024-03-05 14:29:15 +01:00

Tailwind CSS

A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tailwind CSS on GitHub

For chatting with others using the framework:

Join the Tailwind CSS Discord Server

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.