style: Add an internal aspect-ratio CSS property.

Differential Revision: https://phabricator.services.mozilla.com/D29037
This commit is contained in:
Emilio Cobos Álvarez 2019-06-26 22:10:04 +00:00
parent 87e3dadf22
commit 960be2fd01
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 15 additions and 0 deletions

View file

@ -337,6 +337,7 @@ class Longhand(object):
"MozScriptMinSize",
"MozScriptSizeMultiplier",
"NonNegativeNumber",
"Number",
"OffsetRotate",
"Opacity",
"OutlineStyle",

View file

@ -391,3 +391,17 @@ ${helpers.predefined_type(
animation_value_type="NonNegativeLengthPercentageOrNormal",
servo_restyle_damage="reflow",
)}
// NOTE(emilio): Before exposing this property to content, we probably need to
// change syntax and such, and make it apply to more elements.
//
// For now, it's used only for mapped attributes.
${helpers.predefined_type(
"aspect-ratio",
"Number",
"computed::Number::zero()",
animation_value_type="ComputedValue",
spec="Internal, for now",
enabled_in="",
servo_restyle_damage="reflow",
)}