Re: [csswg-drafts] [css-sizing-4] Proposal to allow `fr` units to be used for width/height, margin and padding. (#8267)

I like this suggestion. Being able to divide remaining space with fr for margins would be quite handy in places.

Say I want to left-ish align some content on larger screens, but don't want it to leave too large a space on the right hand side, this feature would be convenient without reaching for a flex or grid layout.

A current method to 'offset' centre a div
```html
<div style="display: flex;">
    <div style="flex-grow:1"></div>
    <div style="width: 60rem; max-width: 100%;"></div>
    <div style="flex-grow:2"></div>
</div>
```

Revised
```html
<div style="display: flex;">
    <div style="width: 60rem; max-width: 100%; margin-inline: 1fr 2fr;"></div>
</div>
```

I could also be missing something obvious here.

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


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

Received on Tuesday, 3 February 2026 11:49:33 UTC