Skip to content

[css-logical-props] percentages need better definition #800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cbiesinger opened this issue Dec 13, 2016 · 2 comments
Closed

[css-logical-props] percentages need better definition #800

cbiesinger opened this issue Dec 13, 2016 · 2 comments
Labels
css-logical-1 Current Work

Comments

@cbiesinger
Copy link

https://drafts.csswg.org/css-logical-props/#propdef-min-block-size

That section (and others) says:

Percentages: block-size/inline-size, respectively, of containing block

However, this is a bit underdefined IMO:

  • A strict reading of that line implies that a min-block-size percentage gets resolved to the parent's block-size property. However, if the parent has an orthogonal writing mode relative to the child, this property actually maps to the inline-size, right?

  • Also, does this need a more explicit mention that percentages only resolve relative to definite sizes?

@prjnt
Copy link

prjnt commented Dec 17, 2016

I propose that the normative text be changed to "As for the corresponding physical property" (preferably accompanied by informative links to relevant parts of CSS).

(In which case the answer to the second question becomes "no" for css-logical-props, as this would already be covered in the definition of the physical property.)

I haven't tested, but I would be quite surprised if any UA had implemented a behaviour where the interpretation of a percentage depended on whether the winner of the cascade was a physical or logical property.

[The "informative" (i.e. non-normative) part of that proposal is important because I suspect that it will be easy to miss some relevant parts of CSS when giving a list of references due to the fact that CSS specs aren't always updated when another part of CSS gives new behaviour for something: e.g. percentage margin-top is resolved against height in page context (see e.g. CSS22/page.html#page-margins), contrary to what the actual propdef for margin-top says in CSS 2.x box.html#margin-properties. Of course css-writing-modes/#dimension-mapping is also relevant. Similar comments apply to the width & height properties, where one would think of referencing the propdef in CSS 2.x visudet.html, but might forget to link to the contradictory information in tables.html of the same spec. Maybe bikeshed format makes it a bit easier to find most definitions of percentages for a given property?]

@cbiesinger
Copy link
Author

I would support a change to "As for the corresponding physical property".

@fantasai fantasai added the css-logical-1 Current Work label Mar 30, 2017
triple-underscore added a commit to triple-underscore/triple-underscore.github.io that referenced this issue Apr 25, 2017
…rcentages to corresponding physical properties to avoid mapping confusion. Fixes w3c/csswg-drafts#800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-logical-1 Current Work
Projects
None yet
Development

No branches or pull requests

3 participants