mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Support percentage values for the CSS text-decoration-thickness and text-underline-offset properties.
Differential Revision: https://phabricator.services.mozilla.com/D59777
This commit is contained in:
parent
127755551d
commit
2910ca6197
3 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ pub use crate::values::specified::{TextDecorationSkipInk, TextTransform};
|
|||
pub type InitialLetter = GenericInitialLetter<CSSFloat, CSSInteger>;
|
||||
|
||||
/// Implements type for `text-underline-offset` and `text-decoration-thickness` properties
|
||||
pub type TextDecorationLength = GenericTextDecorationLength<Length>;
|
||||
pub type TextDecorationLength = GenericTextDecorationLength<LengthPercentage>;
|
||||
|
||||
/// A computed value for the `letter-spacing` property.
|
||||
#[repr(transparent)]
|
||||
|
|
|
@ -124,7 +124,7 @@ impl<N, L> LineHeight<N, L> {
|
|||
}
|
||||
|
||||
/// Implements type for text-underline-offset and text-decoration-thickness
|
||||
/// which take the grammar of auto | from-font | <length>
|
||||
/// which take the grammar of auto | from-font | <length> | <percentage>
|
||||
///
|
||||
/// https://drafts.csswg.org/css-text-decor-4/
|
||||
#[repr(C, u8)]
|
||||
|
@ -148,7 +148,7 @@ impl<N, L> LineHeight<N, L> {
|
|||
)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum GenericTextDecorationLength<L> {
|
||||
Length(L),
|
||||
LengthPercentage(L),
|
||||
Auto,
|
||||
FromFont,
|
||||
}
|
||||
|
|
|
@ -1030,7 +1030,7 @@ pub enum TextDecorationSkipInk {
|
|||
}
|
||||
|
||||
/// Implements type for `text-underline-offset` and `text-decoration-thickness` properties
|
||||
pub type TextDecorationLength = GenericTextDecorationLength<Length>;
|
||||
pub type TextDecorationLength = GenericTextDecorationLength<LengthPercentage>;
|
||||
|
||||
impl TextDecorationLength {
|
||||
/// `Auto` value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue