No description
Find a file
Robin Malfait f3e78807af
Parse candidates in .svelte files with class:abc="condition" syntax (#13274)
* handle `.svelte` file

In svelte there is a convention where you can use `<div
class:px-4="condition" />` which means that we extract `class:px-4` as a
utility where `class` is a variant.

This is obviously incorrect, to solve this we can ignore the `class:`
part before parsing the whole file.

This is also what we do in v3.

Ideally we have completely separate parsers for various programming
languages (based on file type) and fallback to the generic one we have
now.

Implementing that, is a much bigger scope.

* flatten match arms

* add test to verify we can parse `class:px-4="condition"`

* explicitly ingore everything but the svelte file

* merge tests

There is some funky stuff happening when running `cargo test` where it
sees contents from another test. Maybe a bug in the tmpdir crate.

I don't see this problem locally when running `cargo nextest run`, but
when using the native `cargo test` command it fails.

* update changelog

* run prettier

* Update oxide/crates/core/src/lib.rs

Co-authored-by: Jordan Pittman <jordan@cryptica.me>

* fixup syntax errors

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-18 23:24:22 +01:00
.github Inline the tailwindcss/index.css contents at publish time (#13233) 2024-03-13 22:26:10 +01:00
oxide Parse candidates in .svelte files with class:abc="condition" syntax (#13274) 2024-03-18 23:24:22 +01:00
packages Add inherit as a universal color (#13258) 2024-03-15 19:31:36 +01:00
playgrounds Move optimizeCss to the packages where it's used (#13230) 2024-03-13 17:25:16 +01:00
scripts Inline the tailwindcss/index.css contents at publish time (#13233) 2024-03-13 22:26:10 +01:00
.gitignore introduce v4 codebase 2024-03-05 14:29:15 +01:00
.npmrc introduce v4 codebase 2024-03-05 14:29:15 +01:00
.prettierignore introduce v4 codebase 2024-03-05 14:29:15 +01:00
CHANGELOG.md Parse candidates in .svelte files with class:abc="condition" syntax (#13274) 2024-03-18 23:24:22 +01:00
LICENSE Add README, LICENSE, and CONTRIBUTING (#13088) 2024-03-05 14:45:39 -05:00
package.json Inline the tailwindcss/index.css contents at publish time (#13233) 2024-03-13 22:26:10 +01:00
pnpm-lock.yaml Inline the tailwindcss/index.css contents at publish time (#13233) 2024-03-13 22:26:10 +01:00
pnpm-workspace.yaml introduce v4 codebase 2024-03-05 14:29:15 +01: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.