lewp_css/domain/at_rules/font_face/
font_stretch.rs

1// This file is part of css. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/css/master/COPYRIGHT. No part of predicator, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
2// Copyright © 2017 The developers of css. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/css/master/COPYRIGHT.
3
4use {
5    crate::{
6        parsers::{Parse, ParserContext},
7        CustomParseError,
8    },
9    cssparser::{ParseError, Parser},
10};
11
12define_css_keyword_enum! {
13    FontStretch:
14    "normal" => normal,
15    "ultra-condensed" => ultra_condensed,
16    "extra-condensed" => extra_condensed,
17    "condensed" => condensed,
18    "semi-condensed" => semi_condensed,
19    "semi-expanded" => semi_expanded,
20    "expanded" => expanded,
21    "extra-expanded" => extra_expanded,
22    "ultra-expanded" => ultra_expanded,
23}
24
25impl Parse for FontStretch {
26    fn parse<'i, 't>(
27        _: &ParserContext,
28        input: &mut Parser<'i, 't>,
29    ) -> Result<Self, ParseError<'i, CustomParseError<'i>>> {
30        FontStretch::parse(input)
31    }
32}