style: adding from-font support to text-underline-offset and text-decoration-thickness.

Differential Revision: https://phabricator.services.mozilla.com/D41476
This commit is contained in:
Charlie Marlow 2019-08-13 17:43:25 +00:00 committed by Emilio Cobos Álvarez
parent 566f1ea600
commit cf7b0e13b6
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
7 changed files with 59 additions and 9 deletions

View file

@ -122,3 +122,33 @@ impl<N, L> LineHeight<N, L> {
LineHeight::Normal
}
}
/// Implements type for text-underline-offset and text-decoration-thickness
/// which take the grammar of auto | from-font | <length>
///
/// https://drafts.csswg.org/css-text-decor-4/
#[repr(C, u8)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(
Animate,
Clone,
Copy,
ComputeSquaredDistance,
ToAnimatedZero,
Debug,
Eq,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
)]
#[allow(missing_docs)]
pub enum GenericTextDecorationLength<L> {
Length(L),
Auto,
FromFont,
}