Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape is not preserved in class selector #2805

Open
tophf opened this issue Jun 27, 2023 · 0 comments
Open

Escape is not preserved in class selector #2805

tophf opened this issue Jun 27, 2023 · 0 comments

Comments

@tophf
Copy link

tophf commented Jun 27, 2023

To reproduce:

.dark\:bg-gray-800 {
     display: none;
}

Current behavior:

No \ in the compiled code.

Expected behavior:

\ should be preserved in the compiled code.

Environment information:

  1. There's an inconvenient workaround {'.dark\:bg-gray-800'} or simply .dark\\:bg-gray-800
  2. https://stylus-lang.com/try.html needs a fix to preserve the escapes in pasted text:
--- a/docs/.vitepress/components/Runkit.vue
+++ b/docs/.vitepress/components/Runkit.vue
@@ -8,7 +8,7 @@
   const RUNKIT_ID = 'runkit-id';
   const CODE = `
   const stylus = require("stylus"); 
-  const str = \`
+  const str = String.raw\`
   // your stylus code here
   body
     color white
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant