Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upKeyword and Punctuator productions are an unreadable mess #985
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
Aug 29, 2017
Member
With a quick CSS rule adding columns and word-spacing, I can achieve the following effect pretty nicely:
However, it doesn't look so nice with single-character tokens IMO:
I guess I need to find a way to make the number of columns adaptive based on width of viewport and width of contents, and keep the width fixed to alternatives line up nicely. Anyone have thoughts on how to do this?
|
With a quick CSS rule adding columns and word-spacing, I can achieve the following effect pretty nicely: However, it doesn't look so nice with single-character tokens IMO: I guess I need to find a way to make the number of columns adaptive based on width of viewport and width of contents, and keep the width fixed to alternatives line up nicely. Anyone have thoughts on how to do this? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
claudepache
Aug 29, 2017
Contributor
@bterlson Use column-width: <min-width> together with column-count: <max-number>? (Disclaimer, I’ve not tried.)
|
@bterlson Use |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
Aug 29, 2017
Member
@claudepache minimum column width isn't the constraint I want when I don't know the widths in advance. I'd want a min-width of ~20px for single characters ~20 columns, but that causes larger tokens to overflow and look horrible.
|
@claudepache minimum column width isn't the constraint I want when I don't know the widths in advance. I'd want a min-width of ~20px for single characters ~20 columns, but that causes larger tokens to overflow and look horrible. |


anba commentedAug 28, 2017
Simply removing
one ofto make it more readable apparently wasn't okay to do (2eb9eb2). Is it possible to layout these productions in some other way to make them more easy to read?