mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Clean up text-justify, and make distribute a parse-time alias
Since it's simpler, as discussed in the CSSWG issue. Differential Revision: https://phabricator.services.mozilla.com/D111346
This commit is contained in:
parent
bbc03a2577
commit
b40f4b6fec
7 changed files with 48 additions and 76 deletions
|
@ -90,7 +90,7 @@ pub use self::text::RubyPosition;
|
|||
pub use self::text::{InitialLetter, LetterSpacing, LineBreak, LineHeight, TextAlign};
|
||||
pub use self::text::{OverflowWrap, TextEmphasisPosition, TextEmphasisStyle, WordBreak};
|
||||
pub use self::text::{TextAlignKeyword, TextDecorationLine, TextOverflow, WordSpacing};
|
||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextTransform};
|
||||
pub use self::text::{TextDecorationLength, TextDecorationSkipInk, TextJustify, TextTransform};
|
||||
pub use self::time::Time;
|
||||
pub use self::transform::{Rotate, Scale, Transform};
|
||||
pub use self::transform::{TransformOrigin, TransformStyle, Translate};
|
||||
|
|
|
@ -1001,6 +1001,33 @@ pub enum WordBreak {
|
|||
BreakWord,
|
||||
}
|
||||
|
||||
/// Values for the `text-justify` CSS property.
|
||||
#[repr(u8)]
|
||||
#[derive(
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
Parse,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum TextJustify {
|
||||
Auto,
|
||||
None,
|
||||
InterWord,
|
||||
// See https://drafts.csswg.org/css-text-3/#valdef-text-justify-distribute
|
||||
// and https://github.com/w3c/csswg-drafts/issues/6156 for the alias.
|
||||
#[parse(aliases = "distribute")]
|
||||
InterCharacter,
|
||||
}
|
||||
|
||||
/// Values for the `line-break` property.
|
||||
#[repr(u8)]
|
||||
#[derive(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue