Click here to Skip to main content
15,884,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<pre>
function HeaderItem({Icon, title}) {
    return (
        <div className='flex  flex-col items-center cursor-pointer group
        w-12 sm:w-20 hover:text-white'>
            <Icon className='h-8 mb-1 group-hover:animate-bounce' />
            <p className="opacity-0 hover:opacity-100 tracking-widest">{title}</p>
        </div>
    );
}
export default HeaderItem;   


What I have tried:

I'm trying to change the height and margin-bottom and other visuals of my icon using tailwindcss (next.js) but after writing it seems no change has happened the icon is the same
Posted
Updated 16-Feb-22 0:47am
v3

1 solution

You need to extend the theme, not overwrite it.

module.exports = {
  mode: "jit",
  purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
      colors: {
        transparent: "transparent",
        current: "currentColor",
        primary: {
          superlight: "#FFFFFF",
          light: "#FFF8F0",
          DEFAULT: "#FFEBD1",
          dark: "#978F85"
        },
        secondary: {
          light: "#EFEFEF",
          DEFAULT: "#A0A0A0",
          dark: "#26221D"
        }
      }
    }
  },
  variants: {
    extend: {}
  },
  plugins: []
};


Also, keep in mind that JIT mode is still not completely bug-free. If you experience issues like that again, try restarting your server.

Hope this helps!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900