izik1 / gbops

The most accurate Game Boy opcode table
https://izik1.github.io/gbops/
MIT License
46 stars 2 forks source link

Table `min-width` is too wide for my screen #28

Closed JarrettBillingsley closed 3 years ago

JarrettBillingsley commented 3 years ago

My laptop is 1440x900, and 150em is just too wide for it.. doing Inspect Element and changing min-width to 80em fixes the issue.

(imo the tables are a lot more readable if the cells are closer to squares anyway)

izik1 commented 3 years ago

I'll try to figure out a way to do this that doesn't cause: image (note the overflow) it's been on my todo list for a long time, but I'm not sure what of my options really work that well:

  1. leave as is (status quo)
  2. change the name to something shorter (to what though, the ldh mnemonic doesn't tell the whole story)
  3. make the font smaller (which feels suboptimal, the font is already fairly small)
  4. make the cells able to vary in width (which makes the table feel less clean due to the cells being non-uniform)
  5. don't use a pre for formatting, allow the lines to be split between "words"

Currently (to me) the most likely is that last one, since it would allow cells to get arbitrarily small (within reason)...

Investigating

JarrettBillingsley commented 3 years ago

fwiw 1400px wide fits comfortably on my screen with plenty of room in each cell for its contents. not saying that's what you should make that the new minimum, which just moves the goalposts, but just to have as a data point ;)

izik1 commented 3 years ago

@JarrettBillingsley Now that I got CI working again (my travis key expired, and I might as well use actions since I publish to GH-pages), care to look if that solves it? I did set a minimum of 75em for the table because less than that and you probably need to scroll anyway (I might be able to deal with media queries in the future), but otherwise it should handle much smaller screens somewhat responsibly now. If it has to add an extra line the table won't be evenly sized everywhere, but I don't have the css knowledge to fix that currently. Mostly a backend engineer :sweat_smile: Probably something with css grid... Which I've tried to move to a couple times because it Just Makes More Sense:tm:

izik1 commented 3 years ago

fwiw, the table does technically work now without setting a minimum, I just figure "have to scroll at 75 em" is better than getting close to the "each character has its own line" problem

JarrettBillingsley commented 3 years ago

Ohhhh that's so much nicer. Doesn't even look bad when super narrow (not that I'd usually use it like that, but it's not like, unreadable or anything). Thank you!!