mirror of
https://github.com/servo/servo.git
synced 2025-08-18 20:05:34 +01:00
style: Implement scroll-margin parser and serializer.
The reason why we use RelaxedAtomBool is that ScrollSnapUtils::GetSnapPointForDestination() is called both from the main and the compositor threads, and the function will have a branch depending on the pref value. Differential Revision: https://phabricator.services.mozilla.com/D20101
This commit is contained in:
parent
d6750de0c3
commit
79a5e97c13
3 changed files with 50 additions and 1 deletions
|
@ -28,3 +28,32 @@ ${helpers.two_properties_shorthand(
|
|||
"specified::LengthPercentageOrAuto::parse",
|
||||
spec="https://drafts.csswg.org/css-logical/#propdef-margin-inline"
|
||||
)}
|
||||
|
||||
${helpers.four_sides_shorthand(
|
||||
"scroll-margin",
|
||||
"scroll-margin-%s",
|
||||
"specified::Length::parse",
|
||||
spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin",
|
||||
products="gecko",
|
||||
gecko_pref="layout.css.scroll-snap-v1.enabled",
|
||||
)}
|
||||
|
||||
${helpers.two_properties_shorthand(
|
||||
"scroll-margin-block",
|
||||
"scroll-margin-block-start",
|
||||
"scroll-margin-block-end",
|
||||
"specified::Length::parse",
|
||||
spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block",
|
||||
products="gecko",
|
||||
gecko_pref="layout.css.scroll-snap-v1.enabled",
|
||||
)}
|
||||
|
||||
${helpers.two_properties_shorthand(
|
||||
"scroll-margin-inline",
|
||||
"scroll-margin-inline-start",
|
||||
"scroll-margin-inline-end",
|
||||
"specified::Length::parse",
|
||||
spec="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-inline",
|
||||
products="gecko",
|
||||
gecko_pref="layout.css.scroll-snap-v1.enabled",
|
||||
)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue