-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[css-overscroll-behavior] Parsing, serialization #13873
[css-overscroll-behavior] Parsing, serialization #13873
Conversation
Spec: https://drafts.csswg.org/css-overscroll-behavior/#property-index Blink currently fails the proposed serialization tests for the overscroll-behavior shorthand, as it is not following the following guideline: https://drafts.csswg.org/cssom/#serializing-css-values If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.
</head> | ||
<body> | ||
<script> | ||
test_invalid_value("overscroll-behavior-y", "normal"); |
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.
nit: I feel these can be merged with "-x" version. e.g.,
for (let property of ["overscroll-behavior-x", "overscroll-behavior-y"]) {
test_invalid_value(property, "normal");
// ...
}
The required control flow is a simple loop which is IMHO quite acceptable to enable parametrized test logic.
We are going to add {inline, block} version of these and I think it will be easier to maintain these tests if we just have one version for all for properties.
Again this is just a nit and I am not an expert in css parsing tests so feel free to ignore my advice if you have strong opinion for the more verbose style.
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 have moved the longhand tests into overscroll-behavior-valid.html
and overscroll-behavior-invalid.html
.
<meta charset="utf-8"> | ||
<title>CSS Overscroll Behavior: parsing overscroll-behavior-x with invalid values</title> | ||
<link rel="author" title="Eric Willigers" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-x/#propdef-overscroll-behavior-x"> |
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.
replace: drafts.csswg.org/css-overscroll-behavior-x with drafts.csswg.org/css-overscroll-behavior in the spec url.
<meta charset="utf-8"> | ||
<title>CSS Overscroll Behavior: parsing overscroll-behavior-x with valid values</title> | ||
<link rel="author" title="Eric Willigers" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-x/#propdef-overscroll-behavior-x"> |
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.
replace: drafts.csswg.org/css-overscroll-behavior-x with drafts.csswg.org/css-overscroll-behavior in the spec url.
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 these tests. These look great!
looks good to me % a few nits.
<meta charset="utf-8"> | ||
<title>CSS Overscroll Behavior: parsing overscroll-behavior-y with invalid values</title> | ||
<link rel="author" title="Eric Willigers" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-y/#propdef-overscroll-behavior-y"> |
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.
replace: drafts.csswg.org/css-overscroll-behavior-y with drafts.csswg.org/css-overscroll-behavior in the spec url.
<meta charset="utf-8"> | ||
<title>CSS Overscroll Behavior: parsing overscroll-behavior-y with valid values</title> | ||
<link rel="author" title="Eric Willigers" href="mailto:[email protected]"> | ||
<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-y/#propdef-overscroll-behavior-y"> |
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.
replace: drafts.csswg.org/css-overscroll-behavior-y with drafts.csswg.org/css-overscroll-behavior in the spec url.
Once these land I am happy to fix the Blink side of this. |
d2aba1c
to
3a874ed
Compare
Spec:
https://drafts.csswg.org/css-overscroll-behavior/#property-index
Blink currently fails the proposed serialization
tests for the overscroll-behavior shorthand, as it
is not following the following guideline:
https://drafts.csswg.org/cssom/#serializing-css-values
If component values can be omitted or replaced with a shorter
representation without changing the meaning of the value,
omit/replace them.