Skip to content
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

Add combined <*-percentage> data types from V&U to CSS 2.2 #504

Open
SebastianZ opened this issue Sep 20, 2016 · 3 comments
Open

Add combined <*-percentage> data types from V&U to CSS 2.2 #504

SebastianZ opened this issue Sep 20, 2016 · 3 comments
Labels

Comments

@SebastianZ
Copy link
Contributor

SebastianZ commented Sep 20, 2016

CSS Values and Units Level 4 defines several combined percentage data types, which clarify how the percentages will be computed in the end.

Those <*-percentage> types should be incorporated into the CSS 2.2 specification or it should reference to V&U 4.

Sebastian

@fantasai
Copy link
Collaborator

They don't clarify any behavior. It's grammatical syntactic sugar. Not really worth fixing imho.

@SebastianZ
Copy link
Contributor Author

SebastianZ commented Oct 4, 2016

They don't clarify any behavior. It's grammatical syntactic sugar.

They specify the behavior right in the syntax additionally to the prose, which allows to see at a glance how they are computed.

Not really worth fixing imho.

I could provide a patch if we agreed on it.

Quick overview of properties taking percentage values and whether they could be replaced by the new data types:

Property Computed value <*-percentage> values?
background-position for the absolute value, otherwise a percentage
bottom if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'.
font-size absolute length
height the percentage or 'auto' (as specified) or the absolute length
left if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'.
line-height for and the absolute value; otherwise as specified
margin-bottom the percentage as specified or the absolute length
margin-left the percentage as specified or the absolute length
margin-right the percentage as specified or the absolute length
margin-top the percentage as specified or the absolute length
max-height the percentage as specified or the absolute length or 'none'
max-width the percentage as specified or the absolute length or 'none'
min-height the percentage as specified or the absolute length
min-width the percentage as specified or the absolute length
padding-bottom the percentage as specified or the absolute length
padding-left the percentage as specified or the absolute length
padding-right the percentage as specified or the absolute length
padding-top the percentage as specified or the absolute length
pause-after time
pause-before time
right if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'.
text-indent the percentage as specified or the absolute length
top if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, 'auto'.
volume number
width the percentage or 'auto' as specified or the absolute length

So, the values that can be safely replaced by <*-percentage>s are font-size, line-height, pause-after, pause-before and volume. For the ones with ❓ the descriptions suggest that it's up to the UA whether it computes them to percentage or absolute values.

Having said the above, I agree that it would only be a small improvement. So, if you still think it's not worth fixing - and besides you, @fantasai, I'd like to get feedback about that from @tabatkins - feel free to close this issue.

Sebastian

@tabatkins
Copy link
Member

I think it's worthwhile to update CSS2.2 with this. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants