-
Notifications
You must be signed in to change notification settings - Fork 325
New tests for CSS2 corresponding to the changes introduced by CSS 2.2 #1139
Conversation
Automatic validation checks of commit e7be31f discovered the following problems:In css21/margin-padding-clear/margin-collapse-min-height-001.xht:
In css21/syntax/signed-numbers-001.xht:
In css21/syntax/signed-numbers-001-ref.xht:
In css21/cascade/inherit-computed-001.html:
In css21/visudet/height-percentage-004-ref.xht:
In css21/syntax/characters-0080-009F-001-ref.xht:
In css21/syntax/escaped-url-001-ref.xht:
In css21/cascade/inherit-computed-002.html:
|
w3c-test:mirror |
|
||
<style> | ||
p {font-size: larger} | ||
span {font-size: inherit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using something that isn't font-size
would seem better here, given if the span rule isn't applied or the font-size: inherit
ignored this test will still pass. Seems much better to use a property that isn't inherited by default (border or display, maybe?).
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<title>CSS Reference File</title> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing >
<link rel="help" href="http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit"> | ||
<meta name="assert" content="Each property may also have a cascaded value of 'inherit', which means that, for a given element, the property takes as specified value the computed value of the element's parent."> | ||
<link rel="match" href="inherit-computed-002-ref.html"> | ||
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing >
<style type="text/css"> | ||
body {min-width: 17em} | ||
div.parent {min-height: 2em; height: auto; margin: 1em 0} | ||
div.last-child {margin-bottom: 5em; position: relative} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This being position: relative
doesn't have an effect, does it?
<div></div> | ||
<div></div> | ||
<div class="last-child"> | ||
<div class="float">There's more above than below</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand that statement. There's more… what, above? "There must be more whitespace above this sentence than there is between this and the horizontal rule"?
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16036 includes what seems like a better, easier to understand test of a more normal form (i.e., green boxes, no red). It's much easier to distinguish no red than differing amounts of whitespace!
<link rel="author" title="Bert Bos" href="mailto:bert@w3.org/" /> | ||
|
||
<style type="text/css"> | ||
/* Warning: the next lines contain control characters \201..\237 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this is XHTML and not HTML, can we not just use character references for them?
@@ -33,3 +33,8 @@ AddCharset koi8-r .css | |||
<files ~ '^at-charset-07[1234567]\.css$'> | |||
RemoveCharset .css | |||
</files> | |||
|
|||
<files character-encoding-041.css> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add a character-encoding-041.css.headers
file.
<style type="text/css"> | ||
p {margin-right: 7em} | ||
div {height: 100%; background: red} | ||
div div {position: absolute; top: 0; right: 0; background: lightblue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lightblue
isn't a colour in 2.2, suggest aqua
instead.
|
||
<link rel="help" href="http://www.w3.org/TR/CSS22/visudet.html#the-height-property" title="10.5 Content height: the 'height' property" /> | ||
<meta name="assert" content="If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'. Note: These steps do not affect the real computed value of 'height'." /> | ||
<link rel="match" href="height-percentage-004-ref.xht" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't exist in this commit (though it's added later in c90c4c42cc8fef3587897ba32eb90d35ef0d82fa
) if you care about having a clean history (it certainly makes reviewing easier!)
p {margin-right: 7em} | ||
#container {height: 100%; background: red} | ||
#container div {position: absolute; top: 0; right: 0; | ||
background: lightblue; height: inherit} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case GitHub eats my earlier comment: lightblue
isn't a colour keyword in 2.2.
Automatic validation checks of commit e98d808 discovered the following problems:In css21/margin-padding-clear/margin-collapse-min-height-001.xht:
In css21/syntax/signed-numbers-001.xht:
In css21/cascade/inherit-computed-001.html:
In css21/syntax/signed-numbers-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002-ref.xht:
In css21/cascade/inherit-computed-002.html:
|
Automatic validation checks of commit d031e72 discovered the following problems:In css21/margin-padding-clear/margin-collapse-min-height-001.xht:
In css21/syntax/signed-numbers-001.xht:
In css21/cascade/inherit-computed-001.html:
In css21/syntax/signed-numbers-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002-ref.xht:
In css21/cascade/inherit-computed-002.html:
|
Automatic validation checks of commit 54e287a discovered the following problems:In css21/margin-padding-clear/margin-collapse-min-height-001.xht:
In css21/syntax/signed-numbers-001.xht:
In css21/cascade/inherit-computed-001.html:
In css21/syntax/signed-numbers-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002.xht:
In css21/margin-padding-clear/margin-collapse-min-height-002-ref.xht:
In css21/cascade/inherit-computed-002.html:
|
Thanks for your review! Some comments and questions inline:
I added a border as well. How do I update the pull request?
Fixed.
Fixed.
Indeed, it doesn’t. Removed. (It was a copy-paste from another test that I forgot to delete.)
Yes, that’s what it should say and what it says now. (But you don’t have to understand the text: There is a reference file.)
I failed to find an existing test. That one is nice, indeed. I’ve added a version of that test and made a reference file.
No change for now, but I’ll think about it.
Yes, but I don’t know if that poses problems for the conversion to HTML4.
Added. (But what does that file do?)
Fixed.
Sure, but how do I fix that? Cancel the pull request and make a new one?
Seems Github didn’t eat it. :-) Fixed. BertBert Bos ( W 3 C ) http://www.w3.org/ |
Automatic validation checks of commit a272e01 discovered the following problems:
In css21/margin-padding-clear/margin-collapse-min-height-002-ref.xht:
|
On Tuesday, December 6, 2016 10:10:32 AM CET Greg Whitworth wrote:
@bert-github Hey, some of the tests are pointing to CSS2.1 version of
the spec. Are these updates done to the 2.1 version or the 2.2? If
they're the 2.2 it would be good if the spec linked to that one.
Yes, I just changed the links to point to CSS 2.2 instead. I will also
add links to point to the Changes section of CSS 2.2.
Bert
--
Bert Bos ( W 3 C ) http://www.w3.org/
http://www.w3.org/people/bos W3C/ERCIM
bert@w3.org 2004 Rt des Lucioles / BP 93
+33 (0)4 92 38 76 92 06902 Sophia Antipolis Cedex, France
|
Just a general request, not sure what the precedent is since this 2.1 stuff, but can the 2.2 tests live in a 2.2 folder somewhere rather than them being intermixed with 2.1? |
@gregwhitworth that gets into the whole question of whether we want to maintain a 2.0, 2.1, 2.2, etc. testsuite and then whether we have a testsuite for 2.1+errata separately to 2.1 (which in principle should be the same to 2.2, AIUI); thus far we've always leaned towards having a single 2.x testsuite which happens to currently live in css21 directory (hence why we have no tests for the 2.0 definition of |
<head> | ||
<title>CSS test: inherited percentage height</title> | ||
|
||
<link rel="help" href="http://www.w3.org/TR/CSS22/visudet.html#the-height-property" title="10.5 Content height: the 'height' property" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: We should probably ensure (and I haven't checked in the CSSOM or equivalent) that the computed statement is true. This is testing the overall layout, but not the computed value that is returned, at first glance I'm not seeing one. But maybe @gsnedders or @SimonSapin know of one.
@@ -0,0 +1,34 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing one at first glance, but do we have a test that tests this statement?
Negative values for 'min-height' and 'max-height' are illegal.
@@ -0,0 +1,44 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting a test in for this!! :)
So, to answer that, for future reference: a pull request is from a branch to another branch, so the pull request is whatever you push to that branch (even if it's a non-fast-forward push that needs to be forced). In general, when fixing an issue introduced by commit After review and everything, you can use The git-rebase manpage is pretty decent, as is https://github.com/servo/servo/wiki/Beginner's-guide-to-rebasing-and-squashing. |
New tests for CSS2 corresponding to the changes introduced by CSS 2.2 Rebased in #1250.
Landed in #1250. |
…39 (review) Build from revision 5d5916d74ccac5a30003a9882a192ed555338e7b
…39 (review) Build from revision 5d5916d74ccac5a30003a9882a192ed555338e7b
Some 30-odd new tests for the items in http://www.w3.org/TR/CSS22/changes.html
The tests are added in the css21 directory on the assumption that that directory is for all CSS level 2 tests, despite the name.
This change is