Skip to content

feat: add inlineCss optional param in get_screen_code - #179

Open
k-i-k-s wants to merge 1 commit into
davideast:mainfrom
k-i-k-s:feat/inline-css
Open

feat: add inlineCss optional param in get_screen_code#179
k-i-k-s wants to merge 1 commit into
davideast:mainfrom
k-i-k-s:feat/inline-css

Conversation

@k-i-k-s

@k-i-k-s k-i-k-s commented Apr 19, 2026

Copy link
Copy Markdown

Problem

Tailwind CSS is excellent when the final code is written with Tailwind classes, as it produces lean and maintainable output. However, there are cases where the output needs to be plain CSS rather than Tailwind — for example, when integrating with systems that don't support Tailwind, or when the LLM needs to further manipulate the styles. In these scenarios, LLMs often either miss the conversion from Tailwind to CSS entirely, or the conversion process consumes a significant amount of tokens. Inlining CSS directly into the HTML eliminates this burden and produces self-contained, ready-to-use output.

Changes

Code:

  • Added tailwind-to-inline package dependency
  • Added optional inlineCss boolean parameter to get_screen_code tool in src/commands/tool/virtual-tools/get-screen-code.ts
  • When enabled, converts Tailwind classes to inline CSS styles in the generated HTML output

Tests:

  • Updated test file at src/commands/tool/virtual-tools/get-screen-code.test.ts to cover the new parameter

Documentation:

  • Updated docs/build-agent-skills.md with usage example
  • Updated docs/build-virtual-tools.md with usage example
  • Updated docs/tool-catalog.md with parameter documentation

@davideast

Copy link
Copy Markdown
Owner

Woah! This is super cool. Thank you so much @k-i-k-s . I'm gonna make some time to review. I like this idea a lot.

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