mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Don't use define_css_keyword_enum in style anymore
This commit is contained in:
parent
09e304adb3
commit
3d99a4489c
14 changed files with 174 additions and 158 deletions
|
@ -67,13 +67,17 @@ impl ToCss for UrlSource {
|
|||
/// A font-display value for a @font-face rule.
|
||||
/// The font-display descriptor determines how a font face is displayed based
|
||||
/// on whether and when it is downloaded and ready to use.
|
||||
define_css_keyword_enum!(FontDisplay:
|
||||
"auto" => Auto,
|
||||
"block" => Block,
|
||||
"swap" => Swap,
|
||||
"fallback" => Fallback,
|
||||
"optional" => Optional);
|
||||
add_impls_for_keyword_enum!(FontDisplay);
|
||||
#[allow(missing_docs)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq)]
|
||||
#[derive(ToComputedValue, ToCss)]
|
||||
pub enum FontDisplay {
|
||||
Auto,
|
||||
Block,
|
||||
Swap,
|
||||
Fallback,
|
||||
Optional,
|
||||
}
|
||||
|
||||
/// A font-weight value for a @font-face rule.
|
||||
/// The font-weight CSS property specifies the weight or boldness of the font.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue