style: Accept percentage for shape-image-threshold.

Differential Revision: https://phabricator.services.mozilla.com/D39241
This commit is contained in:
Boris Chiou 2019-07-24 21:37:22 +00:00 committed by Emilio Cobos Álvarez
parent 8e7daa77b6
commit 4813390e60
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 3 additions and 13 deletions

View file

@ -410,17 +410,6 @@ impl Parse for NonNegativeNumberOrPercentage {
)]
pub struct Opacity(Number);
impl Opacity {
/// Parse number value only.
#[inline]
pub fn parse_number<'i, 't>(
context: &ParserContext,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>> {
Number::parse(context, input).map(Opacity)
}
}
impl Parse for Opacity {
/// Opacity accepts <number> | <percentage>, so we parse it as NumberOrPercentage,
/// and then convert into an Number if it's a Percentage.