mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Introduce #[css(skip)]
This commit is contained in:
parent
7931df716d
commit
ca45695db1
8 changed files with 31 additions and 96 deletions
|
@ -48,24 +48,16 @@ impl OneOrMoreSeparated for Source {
|
|||
/// `url()` function.
|
||||
///
|
||||
/// <https://drafts.csswg.org/css-fonts/#src-desc>
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToCss)]
|
||||
pub struct UrlSource {
|
||||
/// The specified url.
|
||||
pub url: SpecifiedUrl,
|
||||
/// The format hints specified with the `format()` function.
|
||||
#[css(skip)]
|
||||
pub format_hints: Vec<String>,
|
||||
}
|
||||
|
||||
impl ToCss for UrlSource {
|
||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
self.url.to_css(dest)
|
||||
}
|
||||
}
|
||||
|
||||
/// 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue