Support for changing the color of text selection? #5534
-
It would be great to consider adding some CSS classes to customize the text color selection like the following example extracted from W3Schools documentation. ::-moz-selection { /* Code for Firefox */
color: red;
background: yellow;
}
::selection {
color: red;
background: yellow;
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hey! This is already possible if you have the https://play.tailwindcss.com/kHCKQEz8cE Right now it's only documented on the Just-in-Time page of the Tailwind documentation, but when Tailwind 3.0 makes JIT the default mode, it will be properly documented 👍 https://tailwindcss.com/docs/just-in-time-mode#pseudo-element-variants |
Beta Was this translation helpful? Give feedback.
-
Excellent Simon Vrachliotis! Thank you very much for the answer, I will start testing and implementing it in my projects! I'm already looking forward to v3 🥳 |
Beta Was this translation helpful? Give feedback.
Hey!
This is already possible if you have the
JIT
mode turned on!https://play.tailwindcss.com/kHCKQEz8cE
Right now it's only documented on the Just-in-Time page of the Tailwind documentation, but when Tailwind 3.0 makes JIT the default mode, it will be properly documented 👍
https://tailwindcss.com/docs/just-in-time-mode#pseudo-element-variants