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

Use computed value instead of used value #8

Open
zcorpan opened this issue Jul 6, 2016 · 2 comments
Open

Use computed value instead of used value #8

zcorpan opened this issue Jul 6, 2016 · 2 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented Jul 6, 2016

https://quirks.spec.whatwg.org/#the-line-height-calculation-quirk

The border-right-width, border-left-width, padding-right and padding-left properties have a used value of zero.

Per servo/servo#11853 maybe used value here should instead be computed value.

@zcorpan
Copy link
Member Author

zcorpan commented Jul 6, 2016

cc @nox

@zcorpan
Copy link
Member Author

zcorpan commented Jul 6, 2016

So a case like this?

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4301

<style>
div { width:100px }
span { padding-left:calc(10% - 10px); line-height:20px }
</style>
<div id=test><span></span><small>test</small></div>
<script>
w(getComputedStyle(test).height)
</script>

Gecko and Chromium seem to apply the quirk for this case. (If the padding-left is changed to 1px, the div's height is 20px.)

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

No branches or pull requests

1 participant