Skip to content

fix(ui): generate CSS for grid-cols-13 through grid-cols-40#811

Open
kyleinprogress wants to merge 1 commit into
ostris:mainfrom
kyleinprogress:fix/ui-sample-grid-cols
Open

fix(ui): generate CSS for grid-cols-13 through grid-cols-40#811
kyleinprogress wants to merge 1 commit into
ostris:mainfrom
kyleinprogress:fix/ui-sample-grid-cols

Conversation

@kyleinprogress

Copy link
Copy Markdown

Had an issue where the samples were showing full width instead of the grid. Turns out, if you have more than 12 samples, the grid doesn't work because of the way Tailwind generates the CSS classes.

This fix extends the tailwind config to generate up to 40 to match the the switch in ui/src/components/SampleImages.tsx that goes up to 40.

I originally saw issue #577 and the interim fix listed worked for me, so I fixed why it wasn't being generated. They didn't say how many samples they were generating, so this may or may not fix the issue.

The SampleImages component selects Tailwind grid-cols-N classes
based on the number of sample prompts in the job config, ranging
from 3 to 40. By default Tailwind only generates CSS for grid-cols-1
through grid-cols-12, so configurations with 13+ prompts produced
class names with no associated CSS, causing samples to stack
full-width instead of rendering as a grid.

Extends gridTemplateColumns in tailwind.config.ts to cover the full
range used by the switch statement in SampleImages.tsx.

Fixes ostris#577
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.

1 participant