Skip to content

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

Open
nicomiguelino wants to merge 2 commits into
developmentfrom
chore/adopt-tailwind-css
Open

feat: adopt Tailwind CSS utility classes for styling#6
nicomiguelino wants to merge 2 commits into
developmentfrom
chore/adopt-tailwind-css

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

  • Rework index.html to use Tailwind utility classes (with arbitrary-value bracket syntax for exact colors/dimensions) instead of custom CSS classes, keeping visual appearance and behavior unchanged.
  • Slim src/css/style.css down to the standard layered import pattern:
    @layer theme, base, utilities;
    @import 'tailwindcss/theme.css' layer(theme);
    @import '@screenly/edge-apps/styles' layer(base);
    @import 'tailwindcss/utilities.css' layer(utilities);
    (previously this app only did a bare @import 'tailwindcss' and never pulled in the shared @screenly/edge-apps/styles design-system reset/tokens at all — it now does, via the base layer, ensuring Tailwind utilities always win the cascade.)
  • Bump @screenly/edge-apps to ^1.3.0 (unpublished; ships Tailwind CSS support).
  • Regenerate screenshots/* to reflect the change.

This is part of the company-wide rollout of Tailwind CSS across edge-app repos. Reference implementations:

Notes

  • This app has no visible text content (just a centered <img> showing the rendered Grafana dashboard), so there was minimal custom styling to convert. The only behavioral nuance preserved is the background-color: var(--theme-color-background, #ffffff) fallback on <body>, kept as bg-[var(--theme-color-background,#ffffff)], and the original font-stack fallback (no visible effect today, but preserved for parity) as an arbitrary font-[...] utility.
  • No class names are referenced from .ts sources or e2e/screenshots.spec.ts (JS only ever queries #content img by id), so nothing needed to stay verbatim for functional reasons.
  • bun.lock is intentionally left untouched — only used a local tarball of @screenly/edge-apps@1.3.0 temporarily to build/test.

Test plan

  • bun run type-check passes
  • bun test src/ — 13/13 tests pass
  • bun run build succeeds
  • bun run screenshots — 12/12 Playwright screenshot tests pass (landscape, portrait, and display-errors variants across all target resolutions)
  • Visually inspected 1920x1080, 1080x1920, and 1920x1080-display-errors screenshots — dashboard image renders correctly centered, portrait letterboxing/background color unchanged, error overlay renders correctly

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 marked this pull request as ready for review August 4, 2026 20:44
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