Skip to content

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

Draft
nicomiguelino wants to merge 4 commits into
developmentfrom
feat/tailwind-css-support
Draft

feat: adopt Tailwind CSS utility classes for styling#12
nicomiguelino wants to merge 4 commits into
developmentfrom
feat/tailwind-css-support

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

  • Bump @screenly/edge-apps to ^1.3.0 (Tailwind CSS support, not yet published — matches the version in the tailwind-support branch)
  • Rework index.html to use Tailwind utility classes instead of custom CSS classes, keeping visual appearance and behavior unchanged
  • Slim src/css/style.css down to just the design-system import and the Kelly Slab @font-face
  • Import tailwindcss/theme.css + tailwindcss/utilities.css instead of the full tailwindcss package, skipping Preflight — it resets border/padding on every element, which breaks custom-element hosts like <app-header> (its shadow DOM styles itself via :host)
  • Regenerate screenshots/*.webp to reflect current mock data

Test plan

  • bun test passes (7/7)
  • Verified landscape + portrait renders pixel-match prior appearance via headless Chrome screenshots
  • Regenerated screenshots via bun run screenshots (all 10 pass)

Bump @screenly/edge-apps to 1.3.0 (Tailwind CSS support) and rework
index.html/style.css to use Tailwind utility classes instead of custom
CSS, keeping style.css to just the design-system import and the
Kelly Slab @font-face. Also skips Tailwind's preflight (importing
tailwindcss/theme.css + utilities.css instead of the full package),
since preflight resets border/padding on every element and breaks
custom-element hosts like <app-header>. Screenshots regenerated to
reflect current mock data/timestamps.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the app’s styling from custom CSS selectors to Tailwind utility classes, relying on @screenly/edge-apps Tailwind support and keeping only the design-system import + Kelly Slab font in the local stylesheet.

Changes:

  • Bump @screenly/edge-apps devDependency to ^1.3.0.
  • Replace most custom CSS-driven layout/typography in index.html with Tailwind utility classes (including portrait variants and arbitrary values).
  • Slim src/css/style.css to Tailwind theme/utilities imports (skipping preflight), the design-system import, and the @font-face.

Reviewed changes

Copilot reviewed 3 out of 13 changed files in this pull request and generated 2 comments.

File Description
src/css/style.css Switches styling foundation to Tailwind theme/utilities imports (no preflight) and keeps only font + design-system import.
package.json Updates @screenly/edge-apps version requirement.
index.html Replaces custom CSS classes with Tailwind utilities for layout and presentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread index.html
Address Copilot review feedback: the design-system import
(@screenly/edge-apps/styles) was unlayered while Tailwind's pieces
were layered, so per CSS Cascade Layers, its rules would always beat
Tailwind utility classes on any conflicting selector regardless of
specificity. Wrap it in layer(base) with an explicit
theme/base/utilities order, matching the pattern now documented in
the edge-apps-library README.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 13 changed files in this pull request and generated 1 comment.

Comment thread package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 13 changed files in this pull request and generated 2 comments.

Comment thread index.html
Comment thread index.html Outdated
Address Copilot review feedback: without #app being display:flex in
portrait, main's flex-1/h-full had no flex container to size against,
so main stretched to #app's full height instead of the remaining
space below <app-header>, overflowing 50px past #app's bottom edge
and shifting content's vertical centering off. Restores the original
CSS's #app { display:flex; flex-direction:column } behavior for
portrait mode. Verified via computed-style checks (main's bottom now
aligns with #app's) and a portrait screenshot comparison.
- Add mock-data.yml to .gitignore (local dev-only generated file)
- Regenerate screenshots to reflect the #app portrait flex fix, verified on Pi 5 and Anywhere players
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