mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Format style component.
This commit is contained in:
parent
31fc6cd565
commit
8dab4d659a
120 changed files with 2207 additions and 1417 deletions
|
@ -14,8 +14,7 @@ use values::generics::CounterStyleOrNone;
|
|||
use values::specified::Attr;
|
||||
|
||||
/// A name / value pair for counters.
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
pub struct CounterPair<Integer> {
|
||||
/// The name of the counter.
|
||||
pub name: CustomIdent,
|
||||
|
@ -24,8 +23,9 @@ pub struct CounterPair<Integer> {
|
|||
}
|
||||
|
||||
/// A generic value for the `counter-increment` property.
|
||||
#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
|
||||
)]
|
||||
pub struct CounterIncrement<I>(Counters<I>);
|
||||
|
||||
impl<I> CounterIncrement<I> {
|
||||
|
@ -46,8 +46,9 @@ impl<I> Deref for CounterIncrement<I> {
|
|||
}
|
||||
|
||||
/// A generic value for the `counter-reset` property.
|
||||
#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(
|
||||
Clone, Debug, Default, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss,
|
||||
)]
|
||||
pub struct CounterReset<I>(Counters<I>);
|
||||
|
||||
impl<I> CounterReset<I> {
|
||||
|
@ -70,8 +71,7 @@ impl<I> Deref for CounterReset<I> {
|
|||
/// A generic value for lists of counters.
|
||||
///
|
||||
/// Keyword `none` is represented by an empty vector.
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
pub struct Counters<I>(#[css(iterable, if_empty = "none")] Box<[CounterPair<I>]>);
|
||||
|
||||
impl<I> Default for Counters<I> {
|
||||
|
@ -102,8 +102,7 @@ fn is_decimal(counter_type: &CounterStyleType) -> bool {
|
|||
/// The specified value for the `content` property.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-content/#propdef-content
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
pub enum Content<ImageUrl> {
|
||||
/// `normal` reserved keyword.
|
||||
Normal,
|
||||
|
@ -125,8 +124,7 @@ impl<ImageUrl> Content<ImageUrl> {
|
|||
}
|
||||
|
||||
/// Items for the `content` property.
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo,
|
||||
ToComputedValue, ToCss)]
|
||||
#[derive(Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss)]
|
||||
pub enum ContentItem<ImageUrl> {
|
||||
/// Literal string content.
|
||||
String(Box<str>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue