Skip to content

feat: adopt Tailwind CSS utility classes for styling - #5

Closed
nicomiguelino wants to merge 1 commit into
developmentfrom
chore/adopt-tailwind-css
Closed

feat: adopt Tailwind CSS utility classes for styling#5
nicomiguelino wants to merge 1 commit into
developmentfrom
chore/adopt-tailwind-css

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

Migrates this repo to Tailwind CSS utility classes as part of the company-wide rollout across Edge App repos. This is a pure styling refactor — visual appearance and behavior are unchanged.

  • index.html: replaced custom CSS classes with Tailwind utility classes (arbitrary-value bracket syntax for exact px/rem/color values, portrait: variant for @media (orientation: portrait) overrides). Original class names (header, error-card, channel-card, message, etc.) are kept alongside the new utility classes for stability/readability even though nothing currently depends on them in JS/tests.
  • src/render/index.ts: dynamically created elements (channel cards, message rows, empty state) now get their Tailwind utility classes appended to className alongside the original class name — no change to rendering logic.
  • src/css/style.css: slimmed down to just the Tailwind layer + design-system import boilerplate (no app-specific custom CSS remains, since this app has no @font-face or other runtime-driven styling).
  • package.json: bumped @screenly/edge-apps to ^1.3.0 (unpublished; ships Tailwind support). Lockfile untouched — only used a local tarball temporarily to build/test, then reverted.

Reference PRs used as the pattern for this migration:

Notes / deviations

  • development branch existed and was already in sync with main, so this PR targets development per the standard workflow.
  • Unlike the reference apps, this app has no background image / text-shadow, so body only needed bg-[#111] text-[#f2f2f3].
  • CSS custom properties (--color-surface, --card-radius, etc.) were inlined as literal Tailwind arbitrary values, consistent with the reference PRs.
  • Added explicit m-0 on <h2>/<p> in the error card, since the design system's reset only zeroes margin/padding on html/body, not on all elements (the app's own removed * { margin: 0 } rule previously handled this).
  • Preserved word-break: break-word behavior (not Tailwind's break-words, which maps to overflow-wrap) via the arbitrary property [word-break:break-word] on message/error text.

Test plan

  • bun run type-check — passes
  • bun run build (production) — builds successfully, Tailwind utilities compiled into dist/css/style.css
  • bun test — 10/10 tests pass
  • bun run screenshots — 12/12 Playwright screenshot tests pass; regenerated screenshots reviewed visually (landscape feed, portrait feed, error screen) and match the original design

Rework index.html to use Tailwind utility classes instead of custom CSS
classes, keeping visual appearance and behavior unchanged. Slim the CSS
entry point down to just the design-system import. Bump
@screenly/edge-apps to ^1.3.0 for upcoming Tailwind CSS support.
Regenerate screenshots to reflect the change.
@nicomiguelino
nicomiguelino deleted the chore/adopt-tailwind-css branch July 28, 2026 16:25
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.

1 participant