Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
23147ff
handle `source(…)`
RobinMalfait Oct 23, 2024
a62b010
add integration test for `source(…)`
RobinMalfait Oct 23, 2024
7b45b77
forward correct `source(…)` to the oxide scanner
RobinMalfait Oct 23, 2024
165718a
update test
RobinMalfait Oct 25, 2024
d0731d1
fix turbo input paths
RobinMalfait Oct 25, 2024
9b25bf8
fix some clippy warnings
RobinMalfait Oct 25, 2024
fcf0a9d
promote sources to auto source detection
RobinMalfait Oct 25, 2024
dea08ba
refactor, remove a level of nesting
RobinMalfait Oct 25, 2024
77e8bf9
merge `globs` and `detectSources`
RobinMalfait Oct 25, 2024
c3c82eb
Remove @tailwind utility nodes with parameters
philipp-spiess Oct 25, 2024
98f74f4
validate existence `source(…)` base path
RobinMalfait Oct 25, 2024
193e7bc
provide base and pattern separately
RobinMalfait Oct 25, 2024
2cc2a33
add `bexpand` for expanding glob expressions
RobinMalfait Oct 25, 2024
d612e66
expand patterns in `GlobEntry`
RobinMalfait Oct 25, 2024
9e46992
run prettier
RobinMalfait Oct 25, 2024
810d98a
update test name
RobinMalfait Oct 25, 2024
ec70c4c
refactor: use variable directly
RobinMalfait Oct 25, 2024
1c140a8
update `@tailwindcss/postcss` with new `source(…)` setup
RobinMalfait Oct 25, 2024
894290a
update `@tailwindcss/vite` with new `source(…)` setup
RobinMalfait Oct 25, 2024
6a3159e
cleanup `console.log`
RobinMalfait Oct 25, 2024
9f6ab1a
add todo for follow up PR
RobinMalfait Oct 25, 2024
86e9e4d
add CLI watch mode tests for `@source` and `source(…)`
RobinMalfait Oct 25, 2024
5747d1c
migrate detect sources to sources
RobinMalfait Oct 25, 2024
f3fe3ce
resolves base path in tests
RobinMalfait Oct 25, 2024
d600964
update all instances of `new Scanner(…)`
RobinMalfait Oct 25, 2024
bf39acd
Update crates/oxide/src/lib.rs
RobinMalfait Oct 25, 2024
d549337
Update packages/@tailwindcss-vite/src/index.ts
RobinMalfait Oct 25, 2024
d5b724c
Update packages/@tailwindcss-vite/src/index.ts
RobinMalfait Oct 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove @tailwind utility nodes with parameters
  • Loading branch information
philipp-spiess authored and RobinMalfait committed Oct 28, 2024
commit c3c82eb7c3eb85983888f5cf22c8603ccc33b25e
40 changes: 19 additions & 21 deletions integrations/cli/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,27 +375,25 @@ describe.only('@source', () => {
expect(await fs.dumpFiles('./project-a/dist/*.css')).toMatchInlineSnapshot(`
"
--- ./project-a/dist/out.css ---
@tailwind utilities source('../../project-b') {
.content-\\[\\'project-a\\/node_modules\\/my-lib-1\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-a/node modules/my-lib-1/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-a\\/node_modules\\/my-lib-2\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-a/node modules/my-lib-2/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-a\\/src\\/logo\\.jpg\\'\\] {
--tw-content: 'project-a/src/logo.jpg';
content: var(--tw-content);
}
.content-\\[\\'project-b\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-b/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-c\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-c/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-a\\/node_modules\\/my-lib-1\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-a/node modules/my-lib-1/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-a\\/node_modules\\/my-lib-2\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-a/node modules/my-lib-2/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-a\\/src\\/logo\\.jpg\\'\\] {
--tw-content: 'project-a/src/logo.jpg';
content: var(--tw-content);
}
.content-\\[\\'project-b\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-b/src/index.html';
content: var(--tw-content);
}
.content-\\[\\'project-c\\/src\\/index\\.html\\'\\] {
--tw-content: 'project-c/src/index.html';
content: var(--tw-content);
}
@supports (-moz-orient: inline) {
@layer base {
Expand Down
5 changes: 4 additions & 1 deletion packages/tailwindcss/src/ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ export function toCss(ast: AstNode[]) {

// Rule
if (node.kind === 'rule') {
if (node.selector === '@tailwind utilities') {
if (
node.selector === '@tailwind utilities' ||
node.selector.startsWith('@tailwind utilities ')
) {
for (let child of node.nodes) {
css += stringify(child, depth)
}
Expand Down