Coder Social home page Coder Social logo

Comments (9)

mardausdennis avatar mardausdennis commented on May 24, 2024

Using Tailwind CSS's hover state variants and box-shadow utilities, you can achieve the effect. For example:

<button class="bg-blue-500 text-white font-bold py-2 px-4 rounded hover:bg-blue-600 hover:shadow-md">
  Taxonomy
</button>

from taxonomy.

shiv-2810 avatar shiv-2810 commented on May 24, 2024

this is still open or closed ? can i work on this?

from taxonomy.

SumitKumarDev10 avatar SumitKumarDev10 commented on May 24, 2024

this is still open or closed ? can i work on this?

Hi @shiv-2810 , I'm actively working on this issue. It's still open, and I'll update it once I have a solution or progress to share.

from taxonomy.

SumitKumarDev10 avatar SumitKumarDev10 commented on May 24, 2024

Hey Everybody! I have been able to do the shadow hover effect in light color scheme but i am facing some difficulties while implementing the same in dark color scheme. Is there any variable in the code that I can import to taxonomy/app/(marketing)/page.tsx? Please let me know the same. Thank You in advance!😊

Current Status:

image image

Problem:

image

from taxonomy.

mardausdennis avatar mardausdennis commented on May 24, 2024

You want to create a shadow effect that adapts to both light and dark themes, you have a couple of options:

  1. Global CSS Class:
    • Implement a class in your globals.css.
    • Define different shadow colors for light and dark modes using CSS variables in :root and .dark.
    • Example:
:root {
 --shadow-color [Your Light Mode Shadow Color];
}

.dark {
 --shadow-color [Your Dark Mode Shadow Color];
}

and then use tailwind box-shadow class:
<button class="bg-indigo-500 shadow-lg shadow-shadow-color">Get Started</button>

or of course you can also create a custom class and use this

.custom-shadow {
  box-shadow: var(--shadow-color);
}

When you switch to dark mode, the shadow color will change accordingly. This is a clean approach if you use the shadow effect on many elements across your project.

  1. Tailwind's Dark Mode Variant:
    • Define styles specifically for dark mode using Tailwind's dark: variant.
    • Example:
<button class="bg-blue-500 text-white font-bold py-2 px-4 rounded hover:shadow-md hover:shadow-color.light dark:hover:shadow-color.dark">
Taxonomy
</button>

Either approach works well, depending on your project's needs. The global CSS class method provides a centralized solution for multiple elements, while the Tailwind variant offers a quick way to adjust styles for individual components.

Let me know if you have any further questions!

from taxonomy.

SumitKumarDev10 avatar SumitKumarDev10 commented on May 24, 2024

@mardausdennis
Thanks a lot! It really helped me.😊

from taxonomy.

SumitKumarDev10 avatar SumitKumarDev10 commented on May 24, 2024

Is this better than before?

image image

from taxonomy.

mardausdennis avatar mardausdennis commented on May 24, 2024

Looks like you got it to work! 😀 Make sure to close the issue when everything is working fine.

from taxonomy.

sikandar1838 avatar sikandar1838 commented on May 24, 2024

Looks like you got it to work! 😀 Make sure to close the issue when everything is working fine.
test

from taxonomy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.