Skip to content

feat(create-template): enable Tailwind CSS for scaffolded Edge Apps - #63

Open
nicomiguelino wants to merge 5 commits into
mainfrom
feat/tailwind-support
Open

feat(create-template): enable Tailwind CSS for scaffolded Edge Apps#63
nicomiguelino wants to merge 5 commits into
mainfrom
feat/tailwind-support

Conversation

@nicomiguelino

Copy link
Copy Markdown
Contributor

Summary

  • Enable Tailwind CSS in scaffolded Edge Apps via the @tailwindcss/vite plugin already wired into vite.config.ts (just needed @import 'tailwindcss'; in the scaffold stylesheet)
  • Replace the scaffold's custom flex/layout CSS with Tailwind utility classes to demonstrate usage
  • Document Tailwind support and an <auto-scaler> gotcha (use h-full/w-full, not h-screen/w-screen, since it scales a fixed reference-size box rather than the real viewport)

Test plan

  • Scaffolded a test app with create, linked the library, ran a build, and confirmed Tailwind utilities (including the portrait: variant) compiled into dist/css/style.css
  • npm run lint, npm run format:check, npm run type-check all pass
  • User to review and test manually before merging

- Import tailwindcss in the scaffold stylesheet, using the
  @tailwindcss/vite plugin already wired into vite.config.ts
- Replace scaffold's custom flex/layout CSS with Tailwind utility
  classes to demonstrate usage
- Document Tailwind support and the auto-scaler h-full/w-full vs
  h-screen/w-screen gotcha in both READMEs
@nicomiguelino nicomiguelino self-assigned this Jul 24, 2026
- reflects Tailwind CSS support added in this branch
- import tailwindcss/theme.css and utilities.css directly instead of the
  full tailwindcss package, avoiding Preflight's universal border/margin/
  padding reset which silently overrides shadow-DOM :host styling on
  components like <app-header>
- document the same guidance and warning in README.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables Tailwind CSS usage in the create-scaffolded Edge App template (and documents it) by importing Tailwind’s theme/utilities CSS and showcasing utility-class-based layout in the scaffolded HTML.

Changes:

  • Add Tailwind CSS imports (theme + utilities) to the scaffold stylesheet and remove bespoke layout CSS.
  • Update the scaffolded template markup to use Tailwind utility classes (including portrait: variant).
  • Document Tailwind usage and the <auto-scaler> sizing gotcha in both the template README and the root README.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
scripts/create-template/src/style.css Adds Tailwind theme/utilities imports and removes custom layout CSS.
scripts/create-template/README.md Documents Tailwind usage in scaffolded apps.
scripts/create-template/index.html Replaces custom layout structure with Tailwind utility classes.
README.md Adds a new “Styling with Tailwind CSS” section and usage guidance.
package.json Bumps package version to 1.3.0.
package-lock.json Updates lockfile version fields to 1.3.0.

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

Comment thread scripts/create-template/src/style.css
Comment thread scripts/create-template/README.md Outdated
Comment thread README.md
- update the scaffold README to match the actual theme/utilities imports
  used in src/style.css, instead of the deprecated full 'tailwindcss'
  import
- addresses Copilot review feedback on PR #63

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 5 out of 6 changed files in this pull request and generated 2 comments.

Comment thread scripts/create-template/src/style.css Outdated
Comment thread README.md
- declare an explicit theme/base/utilities layer order and import
  @screenly/edge-apps/styles into the base layer, so Tailwind utility
  classes always win the cascade regardless of selector specificity
- unlayered CSS otherwise beats layered CSS per the Cascade Layers spec,
  letting @screenly/edge-apps/styles's base rules (e.g. its user-select:
  none reset) silently override Tailwind utilities
- document the same layered setup in README.md
- addresses Copilot review feedback on PR #63

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 5 out of 6 changed files in this pull request and generated no new comments.

@nicomiguelino
nicomiguelino marked this pull request as ready for review July 27, 2026 18:48
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