Re: [csswg-drafts] [css-grid][css-sizing] Aspect Ratio

> That wouldn't be how an ew unit works in real CSS though.

It could be spec'd to work just as in EQCSS.

> I think if ew was used on the width property it would equate to the same as if you used %.

@element .select-any-element-here-not-necessarily-the-parent and (max-width: 422px) {
  Inside this block, the element-width unit "ew" is based on the selected element.
  It can be any element.

This is a later example from above:
@element #foo {
  #foo {
    height: 100ew;

> This is a unit that should be usable anywhere like the vw unit, not just on grid items.

Yes, sure!

Perhaps you want to open a new ticket for the ew unit? (there's isn't one yet)

> Imagine how great it would be to be able to write font-size: 20ew,. Now you can have text that scales with the size of its container rather than the size of the viewport! (font-size: 20vw;)

there is for example `font-size: 57ew;`.

But even better for that type of use case would be to be able to say "always fit this line of text in this container (by adjusting property foo eg font-size or letter-spacing), no matter what font is used".


GitHub Notification of comment by tobireif
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 22 August 2018 10:28:16 UTC