Skip to content

docs: add Tailwind CSS integration guide#13291

Merged
ilhan007 merged 1 commit intomainfrom
docs/tailwind-integration
Mar 18, 2026
Merged

docs: add Tailwind CSS integration guide#13291
ilhan007 merged 1 commit intomainfrom
docs/tailwind-integration

Conversation

@ilhan007
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new documentation page (docs/3-frameworks/04-Tailwind.md) explaining how to configure Tailwind CSS to work with UI5 Web Components
  • Adds a FAQ entry linking to the guide

Context

Addresses #8179 — Tailwind's preflight CSS reset sets border-width: 0 on all elements via *, which overrides :host styles on UI5 components that intentionally place borders on the host element for easy customizability.

What the guide covers

  • Why it happens: CSS cascade rules make outer * styles win over shadow DOM :host styles
  • Option A: Disable preflight entirely (v3 config + v4 selective imports)
  • Option B: Keep preflight with targeted all: revert-layer restore for affected components (v3 + v4)
  • Using Tailwind utilities: layout classes work on host elements, Shadow DOM internals need UI5 theming
  • Lists only the ~13 components actually affected (those with border on :host)

Test plan

  • cd packages/website && yarn build passes
  • New page renders at Frameworks > Tailwind CSS
  • FAQ entry links correctly to the guide

Closes #8179

Add documentation for using UI5 Web Components with Tailwind CSS,
addressing the preflight CSS reset conflict reported in #8179.

- New guide at docs/3-frameworks/04-Tailwind.md with setup options
  for both Tailwind v3 and v4 (disable preflight or targeted restore)
- FAQ entry linking to the guide

Closes #8179
@ui5-webcomponents-bot
Copy link
Copy Markdown
Collaborator

ui5-webcomponents-bot commented Mar 18, 2026

🧹 Preview deployment cleaned up: https://pr-13291--ui5-webcomponents.netlify.app

@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 18, 2026 07:21 Inactive
@ilhan007 ilhan007 requested a review from nnaydenow March 18, 2026 07:49
@ilhan007 ilhan007 merged commit 6193cec into main Mar 18, 2026
14 checks passed
@ilhan007 ilhan007 deleted the docs/tailwind-integration branch March 18, 2026 12:29
@ui5-webcomponents-bot ui5-webcomponents-bot temporarily deployed to preview March 18, 2026 12:29 Inactive
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.

tailwindcss: borders missing when using ui5-webcomponents with tailwind

2 participants