W3C home > Mailing lists > Public > public-css-archive@w3.org > November 2019

Re: [csswg-drafts] [css-grid] Do all percentages behave as auto when computing minimum contribution? (#3612)

From: Mats Palmgren via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Nov 2019 01:38:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-549202452-1572831510-sysbot+gh@w3.org>
I don't like this new incompatible definition of "behaves as auto".  The old definition was contextual, meaning that a percentage _behaves as auto_ when its percentage basis is indefinite, otherwise it's simply resolved to a definite length. This is much easier to understand and handle since a percentage is resolved in different situations: for intrinsic sizing purposes, for track sizing contributions, and eventually in layout and you'd use the percentage basis in the local context to determine if it "behaves as auto" or not.

It's also _very_ bad to take a well-known and widely used term like this and redefine it with an incompatible meaning. We have code comments, discussions in Bugzilla, dev forums, review comments, CSSWG github issues etc etc where the term "behaves as auto" is used (with the old meaning). Those comments are now wrong and misleading due to this change.

The new term "depends on the size of its containing block" is also bad. If we have say:
```html
  <p style="width: 100px">
    <div style="width: 100%"></div>
  </p>
```
then the `width` of the `div` definitely depends on the width of the `p`. A percentage **always** depends on its percentage basis to be resolved. If that's not what you intended then it seems you're using "depends on" with a different meaning than it has in the English language.

I think the old definition of "behaves as auto" worked just fine.

CC @dholbert 

-- 
GitHub Notification of comment by MatsPalmgren
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3612#issuecomment-549202452 using your GitHub account
Received on Monday, 4 November 2019 01:38:33 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:56 UTC