style: Add some more tests for disallowed rootMargin values.

This commit is contained in:
Cameron McCormack 2017-10-17 15:08:52 +08:00 committed by Emilio Cobos Álvarez
parent ac74cd57a2
commit 893415c85a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 19 additions and 2 deletions

View file

@ -81,6 +81,11 @@ impl ToNsCssValue for PixelOrPercentage {
}
/// The value of an IntersectionObserver's rootMargin property.
///
/// Only bare px or percentage values are allowed. Other length units and
/// calc() values are not allowed.
///
/// https://w3c.github.io/IntersectionObserver/#parse-a-root-margin
pub struct IntersectionObserverRootMargin(pub Rect<PixelOrPercentage>);
impl Parse for IntersectionObserverRootMargin {