Thanks for the article and the examples! Definitely a topic that could use the coverage.
The ch units took me a minute but I think I understand:
So chs behave similar to ems in the way they can scale with their parent element's font size. The only difference is that the x value you set for chs is approximately equal to the width of x number of characters. That right?
Experienced hybrid designer/developer who collaborates with stakeholders, design, and development teams to deliver solid digital solutions. Focuses on building user-centric, performant, accessible, an
Can't tell you how many times this unit has been the savior for some content-heavy tight layouts. Assuming everything else is responsibly sized w/breakpoints (ie: your fonts get larger at certain BPs) you can generally simplify with max-width: XXch for content, rather than add multiple px widths at corresponding BPs.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the article and the examples! Definitely a topic that could use the coverage.
The ch units took me a minute but I think I understand:
Almost! Itβs a little weird given the name but itβs the width of the 0 (zero) character π
Can't tell you how many times this unit has been the savior for some content-heavy tight layouts. Assuming everything else is responsibly sized w/breakpoints (ie: your fonts get larger at certain BPs) you can generally simplify with
max-width: XXch
for content, rather than add multiple px widths at corresponding BPs.