fix(ui): generate CSS for grid-cols-13 through grid-cols-40#811
Open
kyleinprogress wants to merge 1 commit into
Open
fix(ui): generate CSS for grid-cols-13 through grid-cols-40#811kyleinprogress wants to merge 1 commit into
kyleinprogress wants to merge 1 commit into
Conversation
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
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.
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.tsxthat 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.