question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve Variable Names

See original GitHub issue

The current default minLineHeight is 1.33 and default maxLineHeight is 1.25. Unusual to have a min greater than the max. Maybe a typo?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tinymachinecommented, Feb 21, 2019

UPDATE: Oops, realized I can easily figure this out on my own without parsing the formulas just by checking the resulting line-heights!


Hi @theorosendorf and @traviskochel – I’m making progress on updating the variable names and updating the calc() function to handle transposed min/max values. I want to make sure, though, that I’m respecting the relationship between the width-dependent attributes and the container’s width.

Is the relationship between line-height and container width linear? It looks like font-size and variable grade are linearly related, but I’m struggling to parse the line-height (calcleading) calculations:

https://github.com/glyphic-co/textblock/blob/567a0e3354f8c02469f2dc7c5f7c9f041a341f3e/src/textblock.js#L45-L62

If it’s linear, that’s great. (Though it does seem at odds with this statement in the readme: “Textblock gives you the control you need for setting systems like modular scales”.)

Thanks for any light you can shed on the line-height calculations!

1reaction
theorosendorfcommented, Feb 19, 2019

K, thanks @traviskochel, and thanks for the help @tinymachine!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Good Ideas for Better Variable Names | The Rithm Blog
Good Ideas for Better Variable Names May 04, 2021 · ​In general:​. - Variables that are "global" (defined outside of any functions and...
Read more >
Data Scientists, Your Variable Names Are a Mess. Clean Up ...
Data Scientists, Your Variable Names Are a Mess. Clean Up Your Code. Learn how to improve your code quality with clearer variable names....
Read more >
Writing good variable names - BrainsToBytes
Despite being one of the easiest ways of improving the quality of code, writing good variable names is perhaps the most overlooked skill...
Read more >
Good Variable Names - Wiki
Good Variable Names · Use Pronounceable names · Avoid Encodings · Don't be too cute · Most meanings have multiple words. Pick ONE...
Read more >
How to Write Meaningful Variable Names? | Writing Clean Code
Use Intention-Revealing Names · Name Functions as Verbs · Name Classes as Nouns · Use Meaningful Distinction · Use Pronounceable Names · Use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found