Enum style::properties::PropertyDeclaration [] [src]

pub enum PropertyDeclaration {
    BackgroundColor(SpecifiedValue),
    BackgroundImage(SpecifiedValue),
    BackgroundPositionX(SpecifiedValue),
    BackgroundPositionY(SpecifiedValue),
    BackgroundRepeat(SpecifiedValue),
    BackgroundAttachment(SpecifiedValue),
    BackgroundClip(SpecifiedValue),
    BackgroundOrigin(SpecifiedValue),
    BackgroundSize(SpecifiedValue),
    BorderTopColor(SpecifiedValue),
    BorderTopStyle(SpecifiedValue),
    BorderTopWidth(SpecifiedValue),
    BorderLeftColor(SpecifiedValue),
    BorderLeftStyle(SpecifiedValue),
    BorderLeftWidth(SpecifiedValue),
    BorderBottomColor(SpecifiedValue),
    BorderBottomStyle(SpecifiedValue),
    BorderBottomWidth(SpecifiedValue),
    BorderRightColor(SpecifiedValue),
    BorderRightStyle(SpecifiedValue),
    BorderRightWidth(SpecifiedValue),
    BorderBlockStartColor(SpecifiedValue),
    BorderBlockStartStyle(SpecifiedValue),
    BorderBlockStartWidth(SpecifiedValue),
    BorderBlockEndColor(SpecifiedValue),
    BorderBlockEndStyle(SpecifiedValue),
    BorderBlockEndWidth(SpecifiedValue),
    BorderInlineStartColor(SpecifiedValue),
    BorderInlineStartStyle(SpecifiedValue),
    BorderInlineStartWidth(SpecifiedValue),
    BorderInlineEndColor(SpecifiedValue),
    BorderInlineEndStyle(SpecifiedValue),
    BorderInlineEndWidth(SpecifiedValue),
    BorderTopLeftRadius(Box<SpecifiedValue>),
    BorderTopRightRadius(Box<SpecifiedValue>),
    BorderBottomRightRadius(Box<SpecifiedValue>),
    BorderBottomLeftRadius(Box<SpecifiedValue>),
    BorderImageSource(Box<SpecifiedValue>),
    BorderImageOutset(Box<SpecifiedValue>),
    BorderImageRepeat(SpecifiedValue),
    BorderImageWidth(Box<SpecifiedValue>),
    BorderImageSlice(Box<SpecifiedValue>),
    Display(SpecifiedValue),
    Position(SpecifiedValue),
    Float(SpecifiedValue),
    Clear(SpecifiedValue),
    ServoDisplayForHypotheticalBox(SpecifiedValue),
    VerticalAlign(SpecifiedValue),
    ServoOverflowClipBox(SpecifiedValue),
    OverflowX(SpecifiedValue),
    OverflowY(SpecifiedValue),
    TransitionDuration(SpecifiedValue),
    TransitionTimingFunction(SpecifiedValue),
    TransitionProperty(SpecifiedValue),
    TransitionDelay(SpecifiedValue),
    AnimationName(SpecifiedValue),
    AnimationDuration(SpecifiedValue),
    AnimationTimingFunction(SpecifiedValue),
    AnimationIterationCount(SpecifiedValue),
    AnimationDirection(SpecifiedValue),
    AnimationPlayState(SpecifiedValue),
    AnimationFillMode(SpecifiedValue),
    AnimationDelay(SpecifiedValue),
    Transform(SpecifiedValue),
    Perspective(SpecifiedValue),
    PerspectiveOrigin(Box<SpecifiedValue>),
    BackfaceVisibility(SpecifiedValue),
    TransformStyle(SpecifiedValue),
    TransformOrigin(Box<SpecifiedValue>),
    Color(SpecifiedValue),
    ColumnWidth(SpecifiedValue),
    ColumnCount(SpecifiedValue),
    ColumnGap(SpecifiedValue),
    Content(Box<SpecifiedValue>),
    CounterIncrement(SpecifiedValue),
    CounterReset(SpecifiedValue),
    Opacity(SpecifiedValue),
    BoxShadow(SpecifiedValue),
    Clip(Box<SpecifiedValue>),
    Filter(SpecifiedValue),
    MixBlendMode(SpecifiedValue),
    FontFamily(SpecifiedValue),
    FontStyle(SpecifiedValue),
    FontVariantCaps(SpecifiedValue),
    FontWeight(SpecifiedValue),
    FontSize(SpecifiedValue),
    FontStretch(SpecifiedValue),
    Visibility(SpecifiedValue),
    WritingMode(SpecifiedValue),
    Direction(SpecifiedValue),
    ImageRendering(SpecifiedValue),
    BorderCollapse(SpecifiedValue),
    EmptyCells(SpecifiedValue),
    CaptionSide(SpecifiedValue),
    BorderSpacing(Box<SpecifiedValue>),
    LineHeight(SpecifiedValue),
    TextTransform(SpecifiedValue),
    TextIndent(SpecifiedValue),
    OverflowWrap(SpecifiedValue),
    WordBreak(SpecifiedValue),
    TextJustify(SpecifiedValue),
    TextAlign(SpecifiedValue),
    LetterSpacing(SpecifiedValue),
    WordSpacing(SpecifiedValue),
    ServoTextDecorationsInEffect(SpecifiedValue),
    WhiteSpace(SpecifiedValue),
    TextShadow(SpecifiedValue),
    TextRendering(SpecifiedValue),
    ListStylePosition(SpecifiedValue),
    ListStyleType(SpecifiedValue),
    ListStyleImage(SpecifiedValue),
    Quotes(SpecifiedValue),
    MarginTop(SpecifiedValue),
    MarginLeft(SpecifiedValue),
    MarginBottom(SpecifiedValue),
    MarginRight(SpecifiedValue),
    MarginBlockStart(SpecifiedValue),
    MarginBlockEnd(SpecifiedValue),
    MarginInlineStart(SpecifiedValue),
    MarginInlineEnd(SpecifiedValue),
    OutlineColor(SpecifiedValue),
    OutlineStyle(SpecifiedValue),
    OutlineWidth(SpecifiedValue),
    OutlineOffset(SpecifiedValue),
    PaddingTop(SpecifiedValue),
    PaddingLeft(SpecifiedValue),
    PaddingBottom(SpecifiedValue),
    PaddingRight(SpecifiedValue),
    PaddingBlockStart(SpecifiedValue),
    PaddingBlockEnd(SpecifiedValue),
    PaddingInlineStart(SpecifiedValue),
    PaddingInlineEnd(SpecifiedValue),
    Cursor(SpecifiedValue),
    PointerEvents(SpecifiedValue),
    Top(SpecifiedValue),
    Left(SpecifiedValue),
    Bottom(SpecifiedValue),
    Right(SpecifiedValue),
    OffsetBlockStart(SpecifiedValue),
    OffsetBlockEnd(SpecifiedValue),
    OffsetInlineStart(SpecifiedValue),
    OffsetInlineEnd(SpecifiedValue),
    ZIndex(SpecifiedValue),
    FlexDirection(SpecifiedValue),
    FlexWrap(SpecifiedValue),
    JustifyContent(SpecifiedValue),
    AlignContent(SpecifiedValue),
    AlignItems(SpecifiedValue),
    FlexGrow(SpecifiedValue),
    FlexShrink(SpecifiedValue),
    AlignSelf(SpecifiedValue),
    Order(SpecifiedValue),
    FlexBasis(SpecifiedValue),
    Width(SpecifiedValue),
    MinWidth(SpecifiedValue),
    MaxWidth(SpecifiedValue),
    Height(SpecifiedValue),
    MinHeight(SpecifiedValue),
    MaxHeight(SpecifiedValue),
    BlockSize(SpecifiedValue),
    MinBlockSize(SpecifiedValue),
    MaxBlockSize(SpecifiedValue),
    InlineSize(SpecifiedValue),
    MinInlineSize(SpecifiedValue),
    MaxInlineSize(SpecifiedValue),
    BoxSizing(SpecifiedValue),
    TableLayout(SpecifiedValue),
    TextOverflow(Box<SpecifiedValue>),
    UnicodeBidi(SpecifiedValue),
    TextDecorationLine(SpecifiedValue),
    CSSWideKeyword(LonghandIdCSSWideKeyword),
    WithVariables(LonghandIdArc<UnparsedValue>),
    Custom(NameDeclaredValueOwned<Arc<SpecifiedValue>>),
}

Servo's representation for a property declaration.

Variants

background-color

background-image

background-position-x

background-position-y

background-repeat

background-attachment

background-clip

background-origin

background-size

border-top-color

border-top-style

border-top-width

border-left-color

border-left-style

border-left-width

border-bottom-color

border-bottom-style

border-bottom-width

border-right-color

border-right-style

border-right-width

border-block-start-color

border-block-start-style

border-block-start-width

border-block-end-color

border-block-end-style

border-block-end-width

border-inline-start-color

border-inline-start-style

border-inline-start-width

border-inline-end-color

border-inline-end-style

border-inline-end-width

border-top-left-radius

border-top-right-radius

border-bottom-right-radius

border-bottom-left-radius

border-image-source

border-image-outset

border-image-repeat

border-image-width

border-image-slice

display

position

float

clear

-servo-display-for-hypothetical-box

vertical-align

-servo-overflow-clip-box

overflow-x

overflow-y

transition-duration

transition-timing-function

transition-property

transition-delay

animation-name

animation-duration

animation-timing-function

animation-iteration-count

animation-direction

animation-play-state

animation-fill-mode

animation-delay

transform

perspective

perspective-origin

backface-visibility

transform-style

transform-origin

color

column-width

column-count

column-gap

content

counter-increment

counter-reset

opacity

box-shadow

clip

filter

mix-blend-mode

font-family

font-style

font-variant-caps

font-weight

font-size

font-stretch

visibility

writing-mode

direction

image-rendering

border-collapse

empty-cells

caption-side

border-spacing

line-height

text-transform

text-indent

overflow-wrap

word-break

text-justify

text-align

letter-spacing

word-spacing

-servo-text-decorations-in-effect

white-space

text-shadow

text-rendering

list-style-position

list-style-type

list-style-image

quotes

margin-top

margin-left

margin-bottom

margin-right

margin-block-start

margin-block-end

margin-inline-start

margin-inline-end

outline-color

outline-style

outline-width

outline-offset

padding-top

padding-left

padding-bottom

padding-right

padding-block-start

padding-block-end

padding-inline-start

padding-inline-end

cursor

pointer-events

top

left

bottom

right

offset-block-start

offset-block-end

offset-inline-start

offset-inline-end

z-index

flex-direction

flex-wrap

justify-content

align-content

align-items

flex-grow

flex-shrink

align-self

order

flex-basis

width

min-width

max-width

height

min-height

max-height

block-size

min-block-size

max-block-size

inline-size

min-inline-size

max-inline-size

box-sizing

table-layout

text-overflow

unicode-bidi

text-decoration-line

A css-wide keyword.

An unparsed value that contains var() functions.

A custom property declaration, with the property name and the declared value.

Methods

impl PropertyDeclaration
[src]

[src]

Given a property declaration, return the property declaration id.

[src]

Returns a CSS-wide keyword if the declaration's value is one.

[src]

Is it the default value of line-height?

[src]

Dummy method to avoid cfg()s

[src]

Returns whether the declaration may be serialized as part of a shorthand.

This method returns false if this declaration contains variable or has a CSS-wide keyword value, since these values cannot be serialized as part of a shorthand.

Caller should check with_variables_from_shorthand() and whether all needed declarations has the same CSS-wide keyword first.

Note that, serialization of a shorthand may still fail because of other property-specific requirement even when this method returns true for all the longhand declarations.

[src]

Return whether the value is stored as it was in the CSS source, preserving whitespace (as opposed to being parsed into a more abstract data structure).

This is the case of custom properties and values that contain unsubstituted variables.

Important traits for &'a mut [u8]
[src]

The shorthands that this longhand is part of.

[src]

Returns true if this property declaration is for one of the animatable properties.

[src]

Returns true if this property is a custom property, false otherwise.

[src]

The context parameter controls this:

https://drafts.csswg.org/css-animations/#keyframes

The inside of accepts any CSS property except those defined in this specification, but does accept the animation-play-state property and interprets it specially.

This will not actually parse Importance values, and will always set things to Importance::Normal. Parsing Importance values is the job of PropertyDeclarationParser, we only set them here so that we don't have to reallocate

Trait Implementations

impl Clone for PropertyDeclaration
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for PropertyDeclaration
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for PropertyDeclaration
[src]

[src]

Formats the value using the given formatter. Read more

impl ToCss for PropertyDeclaration
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

Serialize self in CSS syntax and return a string. Read more