3 ms·
I got excited about “clean HTML code” in the title and then realised this outputs tailwind. Any chance of a pure CSS version?
by nailer 3y ago
I got excited about “clean HTML code” in the title and then realised this outputs tailwind. Any chance of a pure CSS version?
- abi 3y agoYeah you should be able to modify the prompts to achieve that easily: https://github.com/abi/screenshot-to-code/blob/main/backend/prompts.py https://github.com/abi/screenshot-to-code/blob/main/backend/... I'll try to add a settings panel in the UI as well.
- nailer 3y agoHah I forget this is just a prompt. I'd suggest modifying the prompt to something like: - Use CSS 'display: grid;' for most UI elements - Use CSS grid justify and align properties to place items inside grid elements - Use padding to separate elements from their children elements - Use gap to to separate elements from their sibling elements - Avoid using margin at all To produce modern-looking HTML without wrapper elements, floats, clearfixes or other hacks.
- abi 3y agoGood idea! Will try to incorporate that. The hardest thing about modifying the prompts is not having a good evaluation method for if it's making things better or worse.