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

#[repr(u16)]pub enum PropertyDeclaration {
    AlignContent(SpecifiedValue),
    AlignItems(SpecifiedValue),
    AlignSelf(SpecifiedValue),
    AspectRatio(AspectRatio),
    BackfaceVisibility(SpecifiedValue),
    BorderCollapse(SpecifiedValue),
    BorderImageRepeat(BorderImageRepeat),
    BoxSizing(SpecifiedValue),
    CaptionSide(SpecifiedValue),
    Clear(Clear),
    ColumnCount(ColumnCount),
    Direction(SpecifiedValue),
    Display(Display),
    EmptyCells(SpecifiedValue),
    FlexDirection(SpecifiedValue),
    FlexWrap(SpecifiedValue),
    Float(Float),
    FontStretch(FontStretch),
    FontStyle(FontStyle),
    FontVariantCaps(SpecifiedValue),
    FontWeight(FontWeight),
    ImageRendering(SpecifiedValue),
    JustifyContent(SpecifiedValue),
    ListStylePosition(SpecifiedValue),
    ListStyleType(SpecifiedValue),
    MixBlendMode(SpecifiedValue),
    Opacity(Opacity),
    Order(Integer),
    OutlineStyle(OutlineStyle),
    OverflowWrap(OverflowWrap),
    PointerEvents(SpecifiedValue),
    Position(SpecifiedValue),
    ServoOverflowClipBox(SpecifiedValue),
    ServoTopLayer(SpecifiedValue),
    TableLayout(SpecifiedValue),
    TextAlign(TextAlign),
    TextDecorationLine(TextDecorationLine),
    TextJustify(SpecifiedValue),
    TextRendering(SpecifiedValue),
    TextTransform(TextTransform),
    TransformStyle(TransformStyle),
    UnicodeBidi(SpecifiedValue),
    Visibility(SpecifiedValue),
    WhiteSpace(SpecifiedValue),
    WordBreak(WordBreak),
    WritingMode(SpecifiedValue),
    ZIndex(ZIndex),
    FlexGrow(NonNegativeNumber),
    FlexShrink(NonNegativeNumber),
    OverflowBlock(Overflow),
    OverflowInline(Overflow),
    OverflowX(Overflow),
    OverflowY(Overflow),
    BorderBlockEndStyle(BorderStyle),
    BorderBlockStartStyle(BorderStyle),
    BorderBottomStyle(BorderStyle),
    BorderInlineEndStyle(BorderStyle),
    BorderInlineStartStyle(BorderStyle),
    BorderLeftStyle(BorderStyle),
    BorderRightStyle(BorderStyle),
    BorderTopStyle(BorderStyle),
    AnimationDelay(SpecifiedValue),
    AnimationDirection(SpecifiedValue),
    AnimationDuration(SpecifiedValue),
    AnimationFillMode(SpecifiedValue),
    AnimationIterationCount(SpecifiedValue),
    AnimationName(SpecifiedValue),
    AnimationPlayState(SpecifiedValue),
    AnimationTimingFunction(SpecifiedValue),
    BackgroundAttachment(SpecifiedValue),
    BackgroundClip(SpecifiedValue),
    BackgroundImage(SpecifiedValue),
    BackgroundOrigin(SpecifiedValue),
    BackgroundPositionX(SpecifiedValue),
    BackgroundPositionY(SpecifiedValue),
    BackgroundRepeat(SpecifiedValue),
    BackgroundSize(SpecifiedValue),
    BorderImageOutset(Box<NonNegativeLengthOrNumberRect>),
    BorderImageSlice(Box<BorderImageSlice>),
    BorderImageSource(Box<Image>),
    BorderImageWidth(Box<BorderImageWidth>),
    BorderSpacing(Box<BorderSpacing>),
    BoxShadow(SpecifiedValue),
    Clip(Box<ClipRectOrAuto>),
    Color(ColorPropertyValue),
    ColumnGap(NonNegativeLengthPercentageOrNormal),
    ColumnWidth(NonNegativeLengthOrAuto),
    Content(Content),
    CounterIncrement(CounterIncrement),
    CounterReset(CounterSetOrReset),
    Cursor(Cursor),
    Filter(SpecifiedValue),
    FlexBasis(Box<FlexBasis>),
    FontFamily(FontFamily),
    FontSize(FontSize),
    LetterSpacing(LetterSpacing),
    LineHeight(LineHeight),
    ListStyleImage(ImageUrlOrNone),
    OutlineOffset(Length),
    Perspective(Perspective),
    PerspectiveOrigin(Box<Position>),
    Quotes(Quotes),
    Rotate(Box<Rotate>),
    Scale(Box<Scale>),
    TextIndent(LengthPercentage),
    TextOverflow(Box<TextOverflow>),
    TextShadow(SpecifiedValue),
    Transform(Transform),
    TransformOrigin(Box<TransformOrigin>),
    TransitionDelay(SpecifiedValue),
    TransitionDuration(SpecifiedValue),
    TransitionProperty(SpecifiedValue),
    TransitionTimingFunction(SpecifiedValue),
    Translate(Box<Translate>),
    VerticalAlign(VerticalAlign),
    WordSpacing(WordSpacing),
    MaxBlockSize(MaxSize),
    MaxHeight(MaxSize),
    MaxInlineSize(MaxSize),
    MaxWidth(MaxSize),
    BorderBottomLeftRadius(Box<BorderCornerRadius>),
    BorderBottomRightRadius(Box<BorderCornerRadius>),
    BorderEndEndRadius(Box<BorderCornerRadius>),
    BorderEndStartRadius(Box<BorderCornerRadius>),
    BorderStartEndRadius(Box<BorderCornerRadius>),
    BorderStartStartRadius(Box<BorderCornerRadius>),
    BorderTopLeftRadius(Box<BorderCornerRadius>),
    BorderTopRightRadius(Box<BorderCornerRadius>),
    PaddingBlockEnd(NonNegativeLengthPercentage),
    PaddingBlockStart(NonNegativeLengthPercentage),
    PaddingBottom(NonNegativeLengthPercentage),
    PaddingInlineEnd(NonNegativeLengthPercentage),
    PaddingInlineStart(NonNegativeLengthPercentage),
    PaddingLeft(NonNegativeLengthPercentage),
    PaddingRight(NonNegativeLengthPercentage),
    PaddingTop(NonNegativeLengthPercentage),
    BlockSize(Size),
    Height(Size),
    InlineSize(Size),
    MinBlockSize(Size),
    MinHeight(Size),
    MinInlineSize(Size),
    MinWidth(Size),
    Width(Size),
    BorderBlockEndWidth(BorderSideWidth),
    BorderBlockStartWidth(BorderSideWidth),
    BorderBottomWidth(BorderSideWidth),
    BorderInlineEndWidth(BorderSideWidth),
    BorderInlineStartWidth(BorderSideWidth),
    BorderLeftWidth(BorderSideWidth),
    BorderRightWidth(BorderSideWidth),
    BorderTopWidth(BorderSideWidth),
    OutlineWidth(BorderSideWidth),
    BackgroundColor(Color),
    BorderBlockEndColor(Color),
    BorderBlockStartColor(Color),
    BorderBottomColor(Color),
    BorderInlineEndColor(Color),
    BorderInlineStartColor(Color),
    BorderLeftColor(Color),
    BorderRightColor(Color),
    BorderTopColor(Color),
    OutlineColor(Color),
    Bottom(LengthPercentageOrAuto),
    InsetBlockEnd(LengthPercentageOrAuto),
    InsetBlockStart(LengthPercentageOrAuto),
    InsetInlineEnd(LengthPercentageOrAuto),
    InsetInlineStart(LengthPercentageOrAuto),
    Left(LengthPercentageOrAuto),
    MarginBlockEnd(LengthPercentageOrAuto),
    MarginBlockStart(LengthPercentageOrAuto),
    MarginBottom(LengthPercentageOrAuto),
    MarginInlineEnd(LengthPercentageOrAuto),
    MarginInlineStart(LengthPercentageOrAuto),
    MarginLeft(LengthPercentageOrAuto),
    MarginRight(LengthPercentageOrAuto),
    MarginTop(LengthPercentageOrAuto),
    Right(LengthPercentageOrAuto),
    Top(LengthPercentageOrAuto),
    CSSWideKeyword(WideKeywordDeclaration),
    WithVariables(VariableDeclaration),
    Custom(CustomDeclaration),
}

Servo's representation for a property declaration.

Variants

AlignContent(SpecifiedValue)

align-content

AlignItems(SpecifiedValue)

align-items

AlignSelf(SpecifiedValue)

align-self

AspectRatio(AspectRatio)

aspect-ratio

BackfaceVisibility(SpecifiedValue)

backface-visibility

BorderCollapse(SpecifiedValue)

border-collapse

BorderImageRepeat(BorderImageRepeat)

border-image-repeat

BoxSizing(SpecifiedValue)

box-sizing

CaptionSide(SpecifiedValue)

caption-side

Clear(Clear)

clear

ColumnCount(ColumnCount)

column-count

Direction(SpecifiedValue)

direction

Display(Display)

display

EmptyCells(SpecifiedValue)

empty-cells

FlexDirection(SpecifiedValue)

flex-direction

FlexWrap(SpecifiedValue)

flex-wrap

Float(Float)

float

FontStretch(FontStretch)

font-stretch

FontStyle(FontStyle)

font-style

FontVariantCaps(SpecifiedValue)

font-variant-caps

FontWeight(FontWeight)

font-weight

ImageRendering(SpecifiedValue)

image-rendering

JustifyContent(SpecifiedValue)

justify-content

ListStylePosition(SpecifiedValue)

list-style-position

ListStyleType(SpecifiedValue)

list-style-type

MixBlendMode(SpecifiedValue)

mix-blend-mode

Opacity(Opacity)

opacity

Order(Integer)

order

OutlineStyle(OutlineStyle)

outline-style

OverflowWrap(OverflowWrap)

overflow-wrap

PointerEvents(SpecifiedValue)

pointer-events

Position(SpecifiedValue)

position

ServoOverflowClipBox(SpecifiedValue)

-servo-overflow-clip-box

ServoTopLayer(SpecifiedValue)

-servo-top-layer

TableLayout(SpecifiedValue)

table-layout

TextAlign(TextAlign)

text-align

TextDecorationLine(TextDecorationLine)

text-decoration-line

TextJustify(SpecifiedValue)

text-justify

TextRendering(SpecifiedValue)

text-rendering

TextTransform(TextTransform)

text-transform

TransformStyle(TransformStyle)

transform-style

UnicodeBidi(SpecifiedValue)

unicode-bidi

Visibility(SpecifiedValue)

visibility

WhiteSpace(SpecifiedValue)

white-space

WordBreak(WordBreak)

word-break

WritingMode(SpecifiedValue)

writing-mode

ZIndex(ZIndex)

z-index

FlexGrow(NonNegativeNumber)

flex-grow

FlexShrink(NonNegativeNumber)

flex-shrink

OverflowBlock(Overflow)

overflow-block

OverflowInline(Overflow)

overflow-inline

OverflowX(Overflow)

overflow-x

OverflowY(Overflow)

overflow-y

BorderBlockEndStyle(BorderStyle)

border-block-end-style

BorderBlockStartStyle(BorderStyle)

border-block-start-style

BorderBottomStyle(BorderStyle)

border-bottom-style

BorderInlineEndStyle(BorderStyle)

border-inline-end-style

BorderInlineStartStyle(BorderStyle)

border-inline-start-style

BorderLeftStyle(BorderStyle)

border-left-style

BorderRightStyle(BorderStyle)

border-right-style

BorderTopStyle(BorderStyle)

border-top-style

AnimationDelay(SpecifiedValue)

animation-delay

AnimationDirection(SpecifiedValue)

animation-direction

AnimationDuration(SpecifiedValue)

animation-duration

AnimationFillMode(SpecifiedValue)

animation-fill-mode

AnimationIterationCount(SpecifiedValue)

animation-iteration-count

AnimationName(SpecifiedValue)

animation-name

AnimationPlayState(SpecifiedValue)

animation-play-state

AnimationTimingFunction(SpecifiedValue)

animation-timing-function

BackgroundAttachment(SpecifiedValue)

background-attachment

BackgroundClip(SpecifiedValue)

background-clip

BackgroundImage(SpecifiedValue)

background-image

BackgroundOrigin(SpecifiedValue)

background-origin

BackgroundPositionX(SpecifiedValue)

background-position-x

BackgroundPositionY(SpecifiedValue)

background-position-y

BackgroundRepeat(SpecifiedValue)

background-repeat

BackgroundSize(SpecifiedValue)

background-size

BorderImageOutset(Box<NonNegativeLengthOrNumberRect>)

border-image-outset

BorderImageSlice(Box<BorderImageSlice>)

border-image-slice

BorderImageSource(Box<Image>)

border-image-source

BorderImageWidth(Box<BorderImageWidth>)

border-image-width

BorderSpacing(Box<BorderSpacing>)

border-spacing

BoxShadow(SpecifiedValue)

box-shadow

Clip(Box<ClipRectOrAuto>)

clip

Color(ColorPropertyValue)

color

ColumnGap(NonNegativeLengthPercentageOrNormal)

column-gap

ColumnWidth(NonNegativeLengthOrAuto)

column-width

Content(Content)

content

CounterIncrement(CounterIncrement)

counter-increment

CounterReset(CounterSetOrReset)

counter-reset

Cursor(Cursor)

cursor

Filter(SpecifiedValue)

filter

FlexBasis(Box<FlexBasis>)

flex-basis

FontFamily(FontFamily)

font-family

FontSize(FontSize)

font-size

LetterSpacing(LetterSpacing)

letter-spacing

LineHeight(LineHeight)

line-height

ListStyleImage(ImageUrlOrNone)

list-style-image

OutlineOffset(Length)

outline-offset

Perspective(Perspective)

perspective

PerspectiveOrigin(Box<Position>)

perspective-origin

Quotes(Quotes)

quotes

Rotate(Box<Rotate>)

rotate

Scale(Box<Scale>)

scale

TextIndent(LengthPercentage)

text-indent

TextOverflow(Box<TextOverflow>)

text-overflow

TextShadow(SpecifiedValue)

text-shadow

Transform(Transform)

transform

TransformOrigin(Box<TransformOrigin>)

transform-origin

TransitionDelay(SpecifiedValue)

transition-delay

TransitionDuration(SpecifiedValue)

transition-duration

TransitionProperty(SpecifiedValue)

transition-property

TransitionTimingFunction(SpecifiedValue)

transition-timing-function

Translate(Box<Translate>)

translate

VerticalAlign(VerticalAlign)

vertical-align

WordSpacing(WordSpacing)

word-spacing

MaxBlockSize(MaxSize)

max-block-size

MaxHeight(MaxSize)

max-height

MaxInlineSize(MaxSize)

max-inline-size

MaxWidth(MaxSize)

max-width

BorderBottomLeftRadius(Box<BorderCornerRadius>)

border-bottom-left-radius

BorderBottomRightRadius(Box<BorderCornerRadius>)

border-bottom-right-radius

BorderEndEndRadius(Box<BorderCornerRadius>)

border-end-end-radius

BorderEndStartRadius(Box<BorderCornerRadius>)

border-end-start-radius

BorderStartEndRadius(Box<BorderCornerRadius>)

border-start-end-radius

BorderStartStartRadius(Box<BorderCornerRadius>)

border-start-start-radius

BorderTopLeftRadius(Box<BorderCornerRadius>)

border-top-left-radius

BorderTopRightRadius(Box<BorderCornerRadius>)

border-top-right-radius

PaddingBlockEnd(NonNegativeLengthPercentage)

padding-block-end

PaddingBlockStart(NonNegativeLengthPercentage)

padding-block-start

PaddingBottom(NonNegativeLengthPercentage)

padding-bottom

PaddingInlineEnd(NonNegativeLengthPercentage)

padding-inline-end

PaddingInlineStart(NonNegativeLengthPercentage)

padding-inline-start

PaddingLeft(NonNegativeLengthPercentage)

padding-left

PaddingRight(NonNegativeLengthPercentage)

padding-right

PaddingTop(NonNegativeLengthPercentage)

padding-top

BlockSize(Size)

block-size

Height(Size)

height

InlineSize(Size)

inline-size

MinBlockSize(Size)

min-block-size

MinHeight(Size)

min-height

MinInlineSize(Size)

min-inline-size

MinWidth(Size)

min-width

Width(Size)

width

BorderBlockEndWidth(BorderSideWidth)

border-block-end-width

BorderBlockStartWidth(BorderSideWidth)

border-block-start-width

BorderBottomWidth(BorderSideWidth)

border-bottom-width

BorderInlineEndWidth(BorderSideWidth)

border-inline-end-width

BorderInlineStartWidth(BorderSideWidth)

border-inline-start-width

BorderLeftWidth(BorderSideWidth)

border-left-width

BorderRightWidth(BorderSideWidth)

border-right-width

BorderTopWidth(BorderSideWidth)

border-top-width

OutlineWidth(BorderSideWidth)

outline-width

BackgroundColor(Color)

background-color

BorderBlockEndColor(Color)

border-block-end-color

BorderBlockStartColor(Color)

border-block-start-color

BorderBottomColor(Color)

border-bottom-color

BorderInlineEndColor(Color)

border-inline-end-color

BorderInlineStartColor(Color)

border-inline-start-color

BorderLeftColor(Color)

border-left-color

BorderRightColor(Color)

border-right-color

BorderTopColor(Color)

border-top-color

OutlineColor(Color)

outline-color

Bottom(LengthPercentageOrAuto)

bottom

InsetBlockEnd(LengthPercentageOrAuto)

inset-block-end

InsetBlockStart(LengthPercentageOrAuto)

inset-block-start

InsetInlineEnd(LengthPercentageOrAuto)

inset-inline-end

InsetInlineStart(LengthPercentageOrAuto)

inset-inline-start

Left(LengthPercentageOrAuto)

left

MarginBlockEnd(LengthPercentageOrAuto)

margin-block-end

MarginBlockStart(LengthPercentageOrAuto)

margin-block-start

MarginBottom(LengthPercentageOrAuto)

margin-bottom

MarginInlineEnd(LengthPercentageOrAuto)

margin-inline-end

MarginInlineStart(LengthPercentageOrAuto)

margin-inline-start

MarginLeft(LengthPercentageOrAuto)

margin-left

MarginRight(LengthPercentageOrAuto)

margin-right

MarginTop(LengthPercentageOrAuto)

margin-top

Right(LengthPercentageOrAuto)

right

Top(LengthPercentageOrAuto)

top

CSSWideKeyword(WideKeywordDeclaration)

A CSS-wide keyword.

WithVariables(VariableDeclaration)

An unparsed declaration.

Custom(CustomDeclaration)

A custom property declaration.

Implementations

impl PropertyDeclaration[src]

pub fn to_css(&self, dest: &mut CssStringWriter) -> Result[src]

Like the method on ToCss, but without the type parameter to avoid accidentally monomorphizing this large function multiple times for different writers.

impl PropertyDeclaration[src]

pub fn id(&self) -> PropertyDeclarationId[src]

Given a property declaration, return the property declaration id.

pub fn to_physical(&self, wm: WritingMode) -> Self[src]

Given a declaration, convert it into a declaration for a corresponding physical property.

fn with_variables_from_shorthand(&self, shorthand: ShorthandId) -> Option<&str>[src]

pub fn css_wide_keyword(id: LonghandId, keyword: CSSWideKeyword) -> Self[src]

Returns a CSS-wide keyword declaration for a given property.

pub fn get_css_wide_keyword(&self) -> Option<CSSWideKeyword>[src]

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

pub fn get_system(&self) -> Option<SystemFont>[src]

Returns whether or not the property is set by a system font

pub fn is_default_line_height(&self) -> bool[src]

Is it the default value of line-height?

pub fn may_serialize_as_part_of_shorthand(&self) -> bool[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.

pub fn value_is_unparsed(&self) -> bool[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.

pub fn is_animatable(&self) -> bool[src]

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

pub fn is_custom(&self) -> bool[src]

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

pub fn parse_into<'i, 't>(
    declarations: &mut SourcePropertyDeclaration,
    id: PropertyId,
    context: &ParserContext,
    input: &mut Parser<'i, 't>
) -> Result<(), ParseError<'i>>
[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]

impl Debug for PropertyDeclaration[src]

impl MallocSizeOf for PropertyDeclaration[src]

impl PartialEq<PropertyDeclaration> for PropertyDeclaration[src]

impl ToShmem for PropertyDeclaration[src]

Auto Trait Implementations

impl RefUnwindSafe for PropertyDeclaration

impl Send for PropertyDeclaration

impl Sync for PropertyDeclaration

impl Unpin for PropertyDeclaration

impl UnwindSafe for PropertyDeclaration

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeBoxed<Box<T>> for T[src]

impl<T> MaybeBoxed<T> for T[src]

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]