New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword and Punctuator productions are an unreadable mess #985

Open
anba opened this Issue Aug 28, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@anba
Contributor

anba commented Aug 28, 2017

Simply removing one of to 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?

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

bterlson Aug 29, 2017

Member

With a quick CSS rule adding columns and word-spacing, I can achieve the following effect pretty nicely:

image

However, it doesn't look so nice with single-character tokens IMO:

image

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?

Member

bterlson commented Aug 29, 2017

With a quick CSS rule adding columns and word-spacing, I can achieve the following effect pretty nicely:

image

However, it doesn't look so nice with single-character tokens IMO:

image

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?

@claudepache

This comment has been minimized.

Show comment
Hide comment
@claudepache

claudepache Aug 29, 2017

Contributor

@bterlson Use column-width: <min-width> together with column-count: <max-number>? (Disclaimer, I’ve not tried.)

Contributor

claudepache commented Aug 29, 2017

@bterlson Use column-width: <min-width> together with column-count: <max-number>? (Disclaimer, I’ve not tried.)

@bterlson

This comment has been minimized.

Show comment
Hide comment
@bterlson

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.

Member

bterlson commented Aug 29, 2017

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment