Skip to content

Commit cb672de

Browse files
authored
css modules: use a terser selector format that requires less escaping (vercel/turborepo#3437)
Fixes WEB-447. Previously, generated classnames would include literal `/` characters, which need escaping when generating selectors. While users should still escape selectors, this avoids it for this case and makes generated code easier to read. This format is also more aligned with what webpack-based css modules generates. This also removes the square character as a separator, since it breaks words and makes double-clicking for selection more difficult.
1 parent 79b7ff8 commit cb672de

File tree

1 file changed

+1
-2
lines changed
  • crates/next-dev-tests/tests/integration/next/font-google/basic/pages

1 file changed

+1
-2
lines changed

crates/next-dev-tests/tests/integration/next/font-google/basic/pages/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export default function Home() {
1818
function runTests() {
1919
it("returns structured data about the font styles from the font function", () => {
2020
expect(interNoArgs).toEqual({
21-
className:
22-
"className◽[project-with-next]/crates/next-dev-tests/tests/integration/next/font-google/basic/[embedded_modules]/@vercel/turbopack-next/internal/font/google/inter_34ab8b4d.module.css",
21+
className: "className__inter_34ab8b4d__77c0d301",
2322
style: {
2423
fontFamily: "'__Inter_34ab8b4d'",
2524
fontStyle: "normal",

0 commit comments

Comments
 (0)