Tailwind theme directive unknown

I have been trying to use tailwind’s theme directive with Sage 10 but somehow it’s not defined in the default installation.

Example

.test-color {
    color: theme('colors.red')
}

Error output
image_2022-03-04_130302

Has anyone faced the same issue before?

I’ve just created a PR for Bud to prevent this error this morning! In the meantime you can add this to your .stylelintrc file in the root of your theme.

"rules": {
    "function-no-unknown": [
      true,
      {
        "ignoreFunctions": [
          "theme"
        ]
      }
    ]
  }
2 Likes