Only colour red working in react component styled with tailwind

Advertisements I’m trying to make custom button element using tailwind and react. I don’t know why when i’m apllying any color different then red it just doesn’t work. I tried with many different colors and I really can’t find why it’s working only with red. >Solution : As per the documentation: The most important implication… Read More Only colour red working in react component styled with tailwind

Tailwind class works when passed as prop but doesn't when applied directly

Advertisements I have this component: export const TextInput = ({ label, wrapperClassName = "", inputClassName = "", labelClassName = "", placeholder = "", …props }: InputProps & FieldHookConfig<string>) => { const [field, meta] = useField(props); return ( <div className={wrapperClassName}> <label className={`block mb-2 text-lg font-medium text-dark ${labelClassName}`} htmlFor={props.id || props.name} > {label} </label> <input className={`bg-gray-50 border… Read More Tailwind class works when passed as prop but doesn't when applied directly

How to set a section image background with a set opacity without affecting section content

Advertisements How to set a section image background with a set opacity without affecting section content? I am trying to set the bg of an html section to an image, but with 50% opacity so you can still see the content. Here is an example of what i tried however it just made the section… Read More How to set a section image background with a set opacity without affecting section content

how to view a navbar menu when you hover over an element when using tailwindcss

Advertisements I am trying to make a navbar menu item by using tailwind, here is the some snippet of the code <!doctype html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://cdn.tailwindcss.com"></script&gt; </head> <body> <li class="w-22 hover:border-gray-700 border-transparent border-b-2 cursor-pointer"> <a href="#">New & Featured</a> <ul class="absolute hidden left-2 mt-2 py-2 w-48 bg-white rounded-lg shadow-xl">… Read More how to view a navbar menu when you hover over an element when using tailwindcss

Using Variables in Vue Nuxt Tailwind

Advertisements This is my loop <template> <div> <!– title –> <section class="pt-4 w-fit mx-32 grid grid-cols-1 lg:grid-cols-4 md:grid-cols-2 justify-items-center justify-center gap-y-20 gap-x-20 mt-4 mb-5"> <tr v-for="product in products" :key="product.id"> <div class="w-56 bg-white rounded-xl duration-500 hover:scale-105 hover:shadow-xl"> <div v-for="(image, index) in product.images" :key="image.url"> <div v-if="index === 0"> <img :src="image.url" alt="" class="h-[14rem] w-72 object-cover rounded-xl"> </div> </div>… Read More Using Variables in Vue Nuxt Tailwind

Select a href in a list item

Advertisements I have to select a a href inside a list and exclude it from specific styling. Could not make it work with nth-child and tailwind. <ul> <li><a href="/" class="">linka</a></li> <li><a href="/" class="">linkb</a></li> <li><a href="/" class="">linkc</a></li> <li><a href="/" class="">linkd</a></li> <li><a href="/" class="">linke</a></li> <li><a href="/" class="">linkf</a></li> </ul> So I want to apply styling to all links,… Read More Select a href in a list item