From 960be2fd0145a4b6d43f0125c75ddf680924b3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 26 Jun 2019 22:10:04 +0000 Subject: [PATCH] style: Add an internal aspect-ratio CSS property. Differential Revision: https://phabricator.services.mozilla.com/D29037 --- components/style/properties/data.py | 1 + .../style/properties/longhands/position.mako.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/components/style/properties/data.py b/components/style/properties/data.py index 13496104a04..25d82e7de68 100644 --- a/components/style/properties/data.py +++ b/components/style/properties/data.py @@ -337,6 +337,7 @@ class Longhand(object): "MozScriptMinSize", "MozScriptSizeMultiplier", "NonNegativeNumber", + "Number", "OffsetRotate", "Opacity", "OutlineStyle", diff --git a/components/style/properties/longhands/position.mako.rs b/components/style/properties/longhands/position.mako.rs index 1ebb986d15d..14fc443a352 100644 --- a/components/style/properties/longhands/position.mako.rs +++ b/components/style/properties/longhands/position.mako.rs @@ -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", +)}