Re: [csswg-drafts] Adding new relative units RCH and REX (#6034)

Sure, I put together an example of what this might look like.

I'm also going to update the proposal, looks like the only way to do the workaround is using JS that creates custom properties, which unfortunately creates layout instability if not properly handled.

Demo
https://codepen.io/chrislachance/pen/zYoJPvP?editors=1100

PS: How would you use the root's line-height however for setting padding, etc?
As aside, seems strange to me that line-height uses EM instead of EX as well. Various fonts sit very differently within the space allotted for them, and EX targets the actual size of the font's x (hopefully), not the generic pixel bounding box set by font-size. (Think I've understood that logic properly.)

-- 
GitHub Notification of comment by chrislachance
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6034#issuecomment-792055859 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 6 March 2021 21:15:34 UTC