-
-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve tailwind config to also catch dynamic classes (#3143)
- Loading branch information
Showing
9 changed files
with
68 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("should see the welcome message", async ({ page }) => { | ||
test("homepage has title 'Leptos + Tailwindcss'", async ({ page }) => { | ||
await page.goto("http://localhost:3000/"); | ||
|
||
await expect(page.locator("h2")).toHaveText("Welcome to Leptos with Tailwind"); | ||
await expect(page).toHaveTitle("Leptos + Tailwindcss"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("homepage has title and links to intro page", async ({ page }) => { | ||
test("homepage has title 'Leptos + Tailwindcss'", async ({ page }) => { | ||
await page.goto("http://localhost:3000/"); | ||
|
||
await expect(page).toHaveTitle("Welcome to Leptos"); | ||
|
||
await expect(page.locator("h1")).toHaveText("Welcome to Leptos!"); | ||
await expect(page).toHaveTitle("Leptos + Tailwindcss"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
module.exports = { | ||
content: ["*.html", "./src/**/*.rs",], | ||
content: { | ||
files: ["*.html", "./src/**/*.rs"], | ||
transform: { | ||
rs: (content) => content.replace(/(?:^|\s)class:/g, ' '), | ||
}, | ||
}, | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test("homepage has title and links to intro page", async ({ page }) => { | ||
test("homepage has title 'Leptos + Tailwindcss'", async ({ page }) => { | ||
await page.goto("http://localhost:8080/"); | ||
|
||
await expect(page).toHaveTitle("Leptos • Counter with Tailwind"); | ||
|
||
await expect(page.locator("h2")).toHaveText("Welcome to Leptos with Tailwind"); | ||
await expect(page).toHaveTitle("Leptos + Tailwindcss"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters