Next.js Discord

Discord Forum

Tailwind / ShadCDN border color not setting via ShadCDN variables

Unanswered
Chinese Alligator posted this in #help-forum
Open in Discord
Chinese AlligatorOP
This is slightly off topic, I am in a next.js environment, I was hoping someone may have run into this and can help me.

I noticed earlier when working with css-grid in my project that i had to explicitly add border-solid to enable border, so that means tailwind preflight hasn't applied rules?

I don't have tailwind preflight disabled, but i made sure to request it be enabled explicitly with no success:
module.exports = {
  darkMode: "selector",
  corePlugins: {
    preflight: true,
  },
...

I'm currently struggling with my ShadCDN dropdown menu's border colors, it appears that the theming variables are not being applied, im unable to change the color of the borders:

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

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: red;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.5rem;
  }
...


Any help appreciated.

2 Replies

Chinese AlligatorOP
im not sure how to properly do this, magenta is being set by me from global.css. however it appears that tailwind is overriding it still in the *,::before,::after selector
Chinese AlligatorOP
holy bananas. i am so lucky i figured it out lol:
missing the following:
@layer base {
...
  * {
    @apply border-border;
  }
...
}