before:content-['>'] doesn't work
See original GitHub issueWhat version of Tailwind CSS are you using?
2.2.7
What build tool (or framework if it abstracts the build tool) are you using?
"next": "11.1.0"
and web playground
What version of Node.js are you using?
v14.16.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction repository
https://play.tailwindcss.com/EMk3HoEN4O
Describe your issue
Hey Tailwind team!
I’m having an issue about content-utilities in JIT mode.
According to that document, we can write content value via content-*
utilities, and it seems like all of them work well.
But I found a bug unexpectedly while I’m trying to use content-['>']
.
The result of the rendering does not show the content >
. You can reproduce by the Reproduction repository URL.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
CSS :before and :after not working? [duplicate] - Stack Overflow
The easiest thing to do is, in the css, set content: '' for both pseudoelements.
Read more >::before / ::after | CSS-Tricks - CSS-Tricks
The ::before and ::after pseudo-elements in CSS allows you to insert content onto a page without it needing to be in the HTML....
Read more >[Fixed] CSS :after element is not working - Weekend Projects
A few ways to fix why :after element is not working. 1. We need to check if we are using the right HTML...
Read more >before - CSS: Cascading Style Sheets - MDN Web Docs
In CSS, ::before creates a pseudo-element that is the first child of the selected element. It is often used to add cosmetic content...
Read more >CSS Before and CSS After – How to Use the Content Property
The content property in CSS defines the content of an element. You may have heard that this property only applies to the ::before...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for providing those workarounds @aggreggator and @nghiepit! I think we can properly support this by improving the regex we use to detect class names in your templates — right now we completely ignore “>” and “<” because they are markers for HTML tags (like
<div>
) but the HTML in the original post parses just fine in browsers, so we should be able to accommodate it.Will leave this open so we have a chance to look, but the workarounds above (especially the character code option) have basically no downside in the mean time so that’s great 👍
@rowild with attribute:
with empty content