Skip to content

fix: add explicit border-border to prevent color leaking from consumer CSS#317

Merged
IzumiSy merged 2 commits into
mainfrom
fix/explicit-border-color
Jun 16, 2026
Merged

fix: add explicit border-border to prevent color leaking from consumer CSS#317
IzumiSy merged 2 commits into
mainfrom
fix/explicit-border-color

Conversation

@IzumiSy

@IzumiSy IzumiSy commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Problem

Components using astw:border (border-width only) relied on the global * { border-color: var(--border) } rule in @layer base. When consumers import Tailwind CSS after app-shell styles, Tailwind's preflight resets border-color to var(--color-gray-200), causing unintended thick gray borders on cards and other components.

This happens when the consumer's CSS import order results in Tailwind's base layer overriding app-shell's base layer:

import "@tailor-platform/app-shell/styles";   // @layer base: * { border-color: var(--border) }
import "./globals.css";                       // @import "tailwindcss" → overrides with gray-200

Solution

Add explicit astw:border-border at the utility layer to all components that previously relied on the global * selector for border-color. This ensures the correct color regardless of CSS import order.

Affected Components

  • card.tsx
  • activity-card/ActivityCard.tsx
  • content.tsx
  • dialog.tsx
  • badge-list.tsx
  • menu.tsx
  • select.tsx
  • combobox.tsx
  • autocomplete.tsx
  • button.tsx (outline variant)
  • data-table/data-table.tsx
  • data-table/toolbar.tsx
  • csv-importer/CsvImporter.tsx
  • attachment/Attachment.tsx

Additional Cleanup

Removed the redundant @theme and @layer base blocks from examples/nextjs-app/src/app/globals.css. The example app does not use custom Tailwind color utilities directly — all theming is handled by app-shell's internal prefixed styles. The @theme block was also broken (wrapping rgba values in hsl()).

IzumiSy added 2 commits June 16, 2026 16:46
…r CSS

Components using `astw:border` (border-width only) relied on the global
`* { border-color: var(--border) }` rule in `@layer base`. When consumers
import Tailwind CSS after app-shell styles, Tailwind's preflight resets
border-color to `var(--color-gray-200)`, causing thick gray borders.

Adding explicit `astw:border-border` at the utility layer ensures the
correct color regardless of CSS import order.
…app globals.css

The example app does not use custom Tailwind color utilities directly;
all theming is handled by app-shell's internal prefixed styles.
The @theme block was also broken (wrapping rgba values in hsl()).
@IzumiSy IzumiSy requested a review from a team June 16, 2026 07:58
@IzumiSy

IzumiSy commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

Changes in this PR does not have any user-facing impact, so no changeset needed.

@IzumiSy IzumiSy self-assigned this Jun 16, 2026
@IzumiSy IzumiSy merged commit 1907f2f into main Jun 16, 2026
3 checks passed
@IzumiSy IzumiSy deleted the fix/explicit-border-color branch June 16, 2026 23:08
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.

2 participants