Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom colors with state variants (e.g hover) #25

Open
epleaner opened this issue Jul 6, 2021 · 1 comment
Open

Support for custom colors with state variants (e.g hover) #25

epleaner opened this issue Jul 6, 2021 · 1 comment

Comments

@epleaner
Copy link

epleaner commented Jul 6, 2021

Expected:

Mirroring tailwindcss/typography's state variant customization (shown here), I expect this custom hover color to be applied to anchors when in dark mode.

My tailwind.config.js fragment:


module.exports = {
  darkMode: "class",
  theme: {
    nightwind: (theme) => ({
      typography: {
        a: {
          color: theme("colors.green.500", defaultTheme.colors.green[500]),
          "&:hover": {
            color: theme("colors.red.100", defaultTheme.colors.red[100]),
          },
        },
      },
    }),
  plugins: [
    require("nightwind"),
  ],
};

Actual:

No hover color is applied; anchors remain the same color as non-hover state.

To be clear: nightwind is working as expected in all other aspects, it's just hover that doesn't seem to be applying. I have no hover:text-xxx-xxx css overrides in any components or tailwind.scss.

@jjranalli
Copy link
Owner

Thanks for pointing this out. Will fix it in one of the future updates!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants