Skip to content

Fix "Unknown at rule @apply (css)" warnings in svelte-check#579

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-unknown-at-rule-apply
Draft

Fix "Unknown at rule @apply (css)" warnings in svelte-check#579
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-unknown-at-rule-apply

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 19, 2026

svelte-check reports Unknown at rule @apply (css) and Unknown at rule @reference (css) because its embedded CSS language service has no knowledge of Tailwind CSS v4 at-rules.

Changes

  • RelationViewer.svelte: Add lang="postcss" to the <style> block. svelte-check unconditionally skips CSS validation for postcss-lang blocks (shouldExcludeValidation('postcss') === true), eliminating the warnings. vitePreprocess() already handles .postcss via Vite's CSS pipeline so runtime behavior is unchanged.

  • frontend/.vscode/settings.json (new): Workspace-scoped VS Code settings with css.customData (for built-in CSS extension on standalone .css files) and css.lint.unknownAtRules: "ignore" (for the Svelte language server in editor mode).

  • frontend/tailwind-css-data.json (new): CSS custom data registering Tailwind v4 at-directives (@apply, @theme, @source, @utility, @variant, @custom-variant, @plugin) so VS Code provides completions and hover info rather than squiggles in .css files.

- Add lang="postcss" to RelationViewer.svelte style block so svelte-check
  skips CSS validation for that block (it doesn't understand Tailwind at-rules)
- Add frontend/.vscode/settings.json with css.customData and
  css.lint.unknownAtRules for VS Code IDE experience
- Add frontend/tailwind-css-data.json registering Tailwind CSS v4 at-rules
  for VS Code's built-in CSS extension

Agent-Logs-Url: https://github.com/otoDB/otoDB/sessions/c5435ba9-c8ec-4bbc-9f47-233f79d44244

Co-authored-by: SnO2WMaN <15155608+SnO2WMaN@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unknown at rule @apply warning in css Fix "Unknown at rule @apply (css)" warnings in svelte-check Apr 19, 2026
Copilot AI requested a review from SnO2WMaN April 19, 2026 09:36
@SnO2WMaN SnO2WMaN added the frontend:refactor Nothing changed for User, but clean or keep order for frontend codes. label May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend:refactor Nothing changed for User, but clean or keep order for frontend codes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unknown at rule @apply (css)を出ないように設定を修正する.

2 participants