style: Simplify text-emphasis-style.

Differential Revision: https://phabricator.services.mozilla.com/D41418
This commit is contained in:
Emilio Cobos Álvarez 2019-08-10 18:15:37 +00:00
parent 9e826e380a
commit fa06241ab6
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
4 changed files with 82 additions and 85 deletions

View file

@ -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),
}