Skip to content

feat(bricks): add CSS export functionality (rebased) - #122

Merged
jackgranatowski merged 1 commit into
mainfrom
feat/export-css-rebased
May 27, 2026
Merged

feat(bricks): add CSS export functionality (rebased)#122
jackgranatowski merged 1 commit into
mainfrom
feat/export-css-rebased

Conversation

@kiro-agent

@kiro-agent kiro-agent Bot commented May 27, 2026

Copy link
Copy Markdown

This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Summary

Rebased PR #119 (feat/export-css) onto current main (which now includes PRs #116, #117, #120). All merge conflicts resolved.

Changes:

  • Create integrations/bricks/admin-app/src/lib/export.js - CSS export generator that mirrors class-css-generator.php on the client side. Reads the reactive tokens store and produces a standalone CSS string wrapped in @layer slashed.overrides { :root { ... } }.
  • Update SaveBar.svelte with "Export CSS" button that triggers a file download (slashed-custom.css)
  • Update built assets (app.css, app.js) with export button styles and logic

How it works:

  1. hasOverrides(tokens) checks if any token sections have non-empty values (enables/disables the Export button)
  2. generateExportCSS(tokens) produces CSS declarations for colors, typography, spacing, radius, shadows, motion, z-index, and contrast tokens
  3. The download uses Blob URL + temporary anchor click pattern

Files changed (4):

  • integrations/bricks/admin-app/src/components/SaveBar.svelte
  • integrations/bricks/admin-app/src/lib/export.js (new)
  • integrations/bricks/assets/admin-app/app.css
  • integrations/bricks/assets/admin-app/app.js

Notes:

  • Supersedes PR feat(bricks): add Export CSS button to admin panel #119 (which has merge conflicts with main)
  • The built assets (app.js) were updated to include the export logic. A full Svelte rebuild (npm run build in admin-app/) is recommended before final merge for production-quality output.

- Create export.js module with generateExportCSS() and hasOverrides()
- Add Export CSS button to SaveBar with downloadCSS handler
- Update built assets (app.css, app.js) with export button styles and logic
@jackgranatowski
jackgranatowski merged commit 005e715 into main May 27, 2026
4 checks passed
@jackgranatowski
jackgranatowski deleted the feat/export-css-rebased branch May 31, 2026 18:01
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