reactjs / react.dev

The React documentation website
https://react.dev/
Creative Commons Attribution 4.0 International
10.98k stars 7.51k forks source link

Weird max-width for home page code example headings. #1699

Open tesseralis opened 5 years ago

tesseralis commented 5 years ago

Is there a reason for max-width: 11em in the home page code headings? (this line: https://github.com/reactjs/reactjs.org/blob/master/src/components/CodeExample/CodeExample.js#L44)

"A Component Using External Plugins" is cut off into two lines when it doesn't need to be:

screen shot 2019-02-16 at 7 06 33 pm

Especially when translated into more verbose languages, this ends up looking weird. See examples in Spanish

tesseralis commented 5 years ago

Okay so it seems like it's a hack to avoid a widow when viewed on a 1280px monitor...

Probably should just add a "no widows/orphans" plugin to remark