Skip to content

Document all @import options on functions and directives page - #2522

Open
MHJahanbakhsh wants to merge 2 commits into
tailwindlabs:mainfrom
MHJahanbakhsh:docs/import-directive-options
Open

Document all @import options on functions and directives page#2522
MHJahanbakhsh wants to merge 2 commits into
tailwindlabs:mainfrom
MHJahanbakhsh:docs/import-directive-options

Conversation

@MHJahanbakhsh

@MHJahanbakhsh MHJahanbakhsh commented Aug 16, 2026

Copy link
Copy Markdown

Summary

  • Document the full set of options that can be passed to @import (important, prefix(), source(), theme(), reference, and layer()) on the functions and directives page.
  • Link out to the existing deeper guides for important/prefix, source detection, and individual stylesheet imports so this page is the central reference without duplicating those docs.

Fixes #2514

Test plan

  • Preview the Functions and directives page and confirm the new @import options section renders correctly
  • Click through the linked anchors (important flag, source base path, disabling Preflight, @reference)
  • Spot-check that the example snippets match supported option syntax

Centralize the options that can be passed to @import (important, prefix, source, theme, reference, and layer) so they are discoverable from the @import directive reference instead of only scattered across other guides.
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@MHJahanbakhsh is attempting to deploy a commit to the Tailwind Labs Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

The PR appears safe to merge.

The previously reported full-entrypoint failure has been resolved by changing the theme(reference) example to import tailwindcss/theme.css, and no blocking failure remains.

Reviews (2): Last reviewed commit: "docs: use theme.css entrypoint for theme..." | Re-trigger Greptile

Comment thread src/docs/functions-and-directives.mdx Outdated
The full tailwindcss entrypoint includes Preflight and utilities, which
breaks theme(reference). Point the example at tailwindcss/theme.css instead.
@MHJahanbakhsh

Copy link
Copy Markdown
Author

Addressed the Greptile feedback: the `theme(reference)` example now imports `tailwindcss/theme.css` instead of the full `tailwindcss` entrypoint, so copying the snippet no longer pulls in Preflight/utilities and breaks the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No central documentation of options @import options

1 participant