mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Simplify text-emphasis-style.
Differential Revision: https://phabricator.services.mozilla.com/D41418
This commit is contained in:
parent
9e826e380a
commit
fa06241ab6
4 changed files with 82 additions and 85 deletions
|
@ -194,22 +194,18 @@ impl TextDecorationsInEffect {
|
|||
}
|
||||
}
|
||||
|
||||
/// computed value for the text-emphasis-style property
|
||||
/// Computed value for the text-emphasis-style property
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum TextEmphasisStyle {
|
||||
/// Keyword value for the text-emphasis-style property (`filled` `open`)
|
||||
Keyword(TextEmphasisKeywordValue),
|
||||
/// [ <fill> || <shape> ]
|
||||
Keyword {
|
||||
#[css(skip_if = "TextEmphasisFillMode::is_filled")]
|
||||
fill: TextEmphasisFillMode,
|
||||
shape: TextEmphasisShapeKeyword,
|
||||
},
|
||||
/// `none`
|
||||
None,
|
||||
/// String (will be used only first grapheme cluster) for the text-emphasis-style property
|
||||
String(String),
|
||||
}
|
||||
|
||||
/// Keyword value for the text-emphasis-style property
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss, ToResolvedValue)]
|
||||
pub struct TextEmphasisKeywordValue {
|
||||
/// fill for the text-emphasis-style property
|
||||
pub fill: TextEmphasisFillMode,
|
||||
/// shape for the text-emphasis-style property
|
||||
pub shape: TextEmphasisShapeKeyword,
|
||||
/// `<string>` (of which only the first grapheme cluster will be used).
|
||||
String(crate::OwnedStr),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue