How To Make Only Placeholder Italics In Tailwind CSS?

Forums CSSHow To Make Only Placeholder Italics In Tailwind CSS?
Staff asked 6 months ago

How to make only placeholder italics in tailwind CSS?

Answers (2)

Add Answer
Umang Ramani Marked As Accepted
Staff answered 4 months ago

Use like this:

 

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
  .placeholder-italic::placeholder{
     font-style: italic;
  }
}

 

<input class="placeholder-italic" />

 

Staff answered 6 months ago
<input class="placeholder:italic placeholder:text-gray-400" />

 

Subscribe

Select Categories