mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Implement scroll-snap-align parser and serializer.
https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align Differential Revision: https://phabricator.services.mozilla.com/D20205
This commit is contained in:
parent
7cbaaf6734
commit
22e12a0f52
8 changed files with 97 additions and 3 deletions
|
@ -339,6 +339,7 @@ class Longhand(object):
|
|||
"Resize",
|
||||
"SVGOpacity",
|
||||
"SVGPaintOrder",
|
||||
"ScrollSnapAlign",
|
||||
"ScrollSnapType",
|
||||
"TextAlign",
|
||||
"TextDecorationLine",
|
||||
|
|
|
@ -1354,6 +1354,7 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
"Appearance": impl_simple,
|
||||
"OverscrollBehavior": impl_simple,
|
||||
"OverflowClipBox": impl_simple,
|
||||
"ScrollSnapAlign": impl_simple,
|
||||
"ScrollSnapType": impl_simple,
|
||||
"Float": impl_simple,
|
||||
"Overflow": impl_simple,
|
||||
|
|
|
@ -417,6 +417,16 @@ ${helpers.single_keyword(
|
|||
animation_value_type="discrete",
|
||||
)}
|
||||
|
||||
${helpers.predefined_type(
|
||||
"scroll-snap-align",
|
||||
"ScrollSnapAlign",
|
||||
"computed::ScrollSnapAlign::none()",
|
||||
products="gecko",
|
||||
gecko_pref="layout.css.scroll-snap-v1.enabled",
|
||||
spec="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap-align",
|
||||
animation_value_type="discrete",
|
||||
)}
|
||||
|
||||
% for axis in ["x", "y"]:
|
||||
${helpers.predefined_type(
|
||||
"scroll-snap-type-" + axis,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue