From ae690bbfa412cc060e41ee751960df51e483be0c Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Fri, 5 Sep 2025 03:32:22 +1000 Subject: [PATCH] DevX: Update CSS directives for Tailwind v4 (#5347) - Provides proper IDE hints and removes warnings from .vue SFC files. - Replaces all the v2 info with v4. --- .vscode/tailwind.json | 44 +++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/.vscode/tailwind.json b/.vscode/tailwind.json index 96a1f5797..4efd1d966 100644 --- a/.vscode/tailwind.json +++ b/.vscode/tailwind.json @@ -2,12 +2,32 @@ "version": 1.1, "atDirectives": [ { - "name": "@tailwind", - "description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.", + "name": "@import", + "description": "Use the `@import` directive to inline CSS files, including Tailwind itself, into your stylesheet.", "references": [ { "name": "Tailwind Documentation", - "url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" + "url": "https://tailwindcss.com/docs/functions-and-directives#import" + } + ] + }, + { + "name": "@theme", + "description": "Use the `@theme` directive to define custom design tokens like fonts, colors, and breakpoints.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#theme" + } + ] + }, + { + "name": "@layer", + "description": "Use the `@layer` directive inside `@theme` to organize custom styles into different layers like `base`, `components`, and `utilities`.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#layer" } ] }, @@ -22,32 +42,32 @@ ] }, { - "name": "@responsive", - "description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n", + "name": "@config", + "description": "Use the `@config` directive to load a legacy JavaScript-based Tailwind configuration file.", "references": [ { "name": "Tailwind Documentation", - "url": "https://tailwindcss.com/docs/functions-and-directives#responsive" + "url": "https://tailwindcss.com/docs/functions-and-directives#config" } ] }, { - "name": "@screen", - "description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n", + "name": "@reference", + "description": "Use the `@reference` directive to import theme variables, custom utilities, and custom variants from other files without duplicating CSS.", "references": [ { "name": "Tailwind Documentation", - "url": "https://tailwindcss.com/docs/functions-and-directives#screen" + "url": "https://tailwindcss.com/docs/functions-and-directives#reference" } ] }, { - "name": "@variants", - "description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n", + "name": "@plugin", + "description": "Use the `@plugin` directive to load a legacy JavaScript-based Tailwind plugin.", "references": [ { "name": "Tailwind Documentation", - "url": "https://tailwindcss.com/docs/functions-and-directives#variants" + "url": "https://tailwindcss.com/docs/functions-and-directives#plugin" } ] }