taylorbryant / gatsby-starter-tailwind

Gatsby starter styled with Tailwind CSS

Home Page:https://gatsby-starter-tailwind.taylorbryant.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add global css?

vnugent opened this issue · comments

I'm trying to add custom classes with tailwind @apply to global.css but they are not processed. @apply ends up in the html.

global.css

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

@layer components {
  .toggle-checkbox:checked {
      @apply: right-0 border-green-400;
      right: 0;
      border-color: #68D391;
  }
}

Screen Shot 2021-03-20 at 2 08 02 PM

I think you just need to remove the colon after @apply.