Crystal: Font weight in Crystal Play

Created on 20 Sep 2018  ·  4Comments  ·  Source: crystal-lang/crystal

I'm struggling to read "thin" font (font-weight: 200) and I'm sure many with bad vision will find it tough to read too. We could reset to normal font weight?

newcomer bug accepted compiler tools topicplayground

Most helpful comment

You can change the font used in $ crystal play when using workbooks, not yet the whole style.
This is can be done since *.css files in a specific directory will be included automatically in workbooks. Maybe it would be good to include them in the whole playground also to offer a workaround.

Having better accessibility options by default is good. I tend to like lighter fonts when the information does not change, but is not a safe choice for everyone. So, 👍 for changing them.

Another lack of a11y would be to have night/light themes. Just two of them built under settings.

For using the workbooks with custom *.css you would need:

$ tree playground/
playground/
├── empty.md
└── resources
    └── font.css

empty.md
~~~

Sample

puts "hello"

~~~

resources/font.css

html { font-weight: normal; }

Run $ crystal play and open http://localhost:8080/workbook/playground/empty or access it via de nav bar menu.

All 4 comments

You can change the font used in $ crystal play when using workbooks, not yet the whole style.
This is can be done since *.css files in a specific directory will be included automatically in workbooks. Maybe it would be good to include them in the whole playground also to offer a workaround.

Having better accessibility options by default is good. I tend to like lighter fonts when the information does not change, but is not a safe choice for everyone. So, 👍 for changing them.

Another lack of a11y would be to have night/light themes. Just two of them built under settings.

For using the workbooks with custom *.css you would need:

$ tree playground/
playground/
├── empty.md
└── resources
    └── font.css

empty.md
~~~

Sample

puts "hello"

~~~

resources/font.css

html { font-weight: normal; }

Run $ crystal play and open http://localhost:8080/workbook/playground/empty or access it via de nav bar menu.

Nice steps! Thanks.

@bcardiff should we close this issue as the PR was merged, or do you guys keep it for tracking?

Sure!

Was this page helpful?
0 / 5 - 0 ratings