feat: adopt Tailwind CSS utility classes for styling - #6
Draft
nicomiguelino wants to merge 1 commit into
Draft
Conversation
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. Also add the explicit `import '@screenly/edge-apps/components'` side-effect import to src/main.ts, matching the pattern already used in clock-app and weather-app: without it, the new library build tree-shakes away the customElements.define() calls for <auto-scaler> (and friends), so the web component never upgrades and the whole layout silently collapses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of the company-wide rollout of Tailwind CSS across Edge App repos. This mirrors the pattern established in:
Changes:
index.html: replaced custom CSS classes with Tailwind utility classes, using arbitrary-value bracket syntax for exact px/gradient/shadow/color values and preserving the app'scalc(N * var(--su))signage-scaling unit convention exactly as before.portrait:variants express the@media (orientation: portrait)overrides. Original class names (card,card-header,card-icon,card-label,card-value,widgets,label-chips,label-chip,no-labels) were kept alongside the new utility classes since the JS/tests reference.label-chipand.no-labelsby selector.src/app.ts: the dynamically-created label chip / "no labels" spans now carry the equivalent Tailwind utility classes appended to their existing class names (no rendering logic changes).src/css/style.css: slimmed down to the standard 4-import Tailwind layer setup pointing at@screenly/edge-apps/styles.src/main.ts: added the explicitimport '@screenly/edge-apps/components'side-effect import (same pattern already used in clock-app/weather-app). Without it, the new library build's bundler tree-shakes away thecustomElements.define()calls for<auto-scaler>etc., so the web component never upgrades — this was a real, silent regression I hit while testing against the new library build, not a stylistic choice, and it's required for this app to keep working under@screenly/edge-apps@^1.3.0.package.json: bump@screenly/edge-appsto^1.3.0(unpublished; ships Tailwind support). Lockfile untouched.screenshots/*: regenerated for all resolutions.Test plan
Tested locally against the unpublished
@screenly/edge-apps1.3.0 tailwind-support tarball (temporarily installed, then reverted before committing — package.json/lockfile are back to the committed dependency shape plus the version-string bump only):bun run type-check— passesbun test— 8/8 tests pass (including.label-chip/.no-labelsselector assertions)bun run build— succeedsbun run screenshots— all 10 resolutions generated successfully