style: Add CSS support for the hyphenate-character property

Differential Revision: https://phabricator.services.mozilla.com/D133889
This commit is contained in:
Jonathan Kew 2023-06-06 17:33:44 +02:00 committed by Oriol Brufau
parent 9e7b8e9202
commit da29cade57
5 changed files with 36 additions and 0 deletions

View file

@ -90,6 +90,7 @@ pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight, TextAl
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify, TextTransform};
pub use self::text::HyphenateCharacter;
pub use self::time::Time;
pub use self::transform::{Rotate, Scale, Transform};
pub use self::transform::{TransformOrigin, TransformStyle, Translate};

View file

@ -37,6 +37,27 @@ pub type WordSpacing = Spacing<LengthPercentage>;
/// A specified value for the `line-height` property.
pub type LineHeight = GenericLineHeight<NonNegativeNumber, NonNegativeLengthPercentage>;
/// A value for the `hyphenate-character` property.
#[derive(
Clone,
Debug,
MallocSizeOf,
Parse,
PartialEq,
SpecifiedValueInfo,
ToComputedValue,
ToCss,
ToResolvedValue,
ToShmem,
)]
#[repr(C, u8)]
pub enum HyphenateCharacter {
/// `auto`
Auto,
/// `<string>`
String(crate::OwnedStr),
}
impl Parse for InitialLetter {
fn parse<'i, 't>(
context: &ParserContext,