mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
A future patch series has some values that should be separated by spaces. This allows us to re-use the code for serialization, but the types do get a little clunky. The separator is now indicated with an associated type.
This commit is contained in:
parent
e41b7d06b4
commit
26179b3660
6 changed files with 64 additions and 14 deletions
|
@ -20,7 +20,7 @@ use parser::{ParserContext, log_css_error, Parse};
|
|||
use selectors::parser::SelectorParseError;
|
||||
use shared_lock::{SharedRwLockReadGuard, ToCssWithGuard};
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, OneOrMoreCommaSeparated, ParseError, StyleParseError};
|
||||
use style_traits::{ToCss, OneOrMoreSeparated, CommaSeparator, ParseError, StyleParseError};
|
||||
use values::specified::url::SpecifiedUrl;
|
||||
|
||||
/// A source for a font-face rule.
|
||||
|
@ -34,7 +34,9 @@ pub enum Source {
|
|||
Local(FamilyName),
|
||||
}
|
||||
|
||||
impl OneOrMoreCommaSeparated for Source {}
|
||||
impl OneOrMoreSeparated for Source {
|
||||
type S = CommaSeparator;
|
||||
}
|
||||
|
||||
/// A `UrlSource` represents a font-face source that has been specified with a
|
||||
/// `url()` function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue