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(LonghandId, CSSWideKeyword),
WithVariables(LonghandId, Arc<UnparsedValue>),
Custom(Name, DeclaredValueOwned<Arc<SpecifiedValue>>),
}Servo's representation for a property declaration.
Variants
BackgroundColor(SpecifiedValue)background-color
BackgroundImage(SpecifiedValue)background-image
BackgroundPositionX(SpecifiedValue)background-position-x
BackgroundPositionY(SpecifiedValue)background-position-y
BackgroundRepeat(SpecifiedValue)background-repeat
BackgroundAttachment(SpecifiedValue)background-attachment
BackgroundClip(SpecifiedValue)background-clip
BackgroundOrigin(SpecifiedValue)background-origin
BackgroundSize(SpecifiedValue)background-size
BorderTopColor(SpecifiedValue)border-top-color
BorderTopStyle(SpecifiedValue)border-top-style
BorderTopWidth(SpecifiedValue)border-top-width
BorderLeftColor(SpecifiedValue)border-left-color
BorderLeftStyle(SpecifiedValue)border-left-style
BorderLeftWidth(SpecifiedValue)border-left-width
BorderBottomColor(SpecifiedValue)border-bottom-color
BorderBottomStyle(SpecifiedValue)border-bottom-style
BorderBottomWidth(SpecifiedValue)border-bottom-width
BorderRightColor(SpecifiedValue)border-right-color
BorderRightStyle(SpecifiedValue)border-right-style
BorderRightWidth(SpecifiedValue)border-right-width
BorderBlockStartColor(SpecifiedValue)border-block-start-color
BorderBlockStartStyle(SpecifiedValue)border-block-start-style
BorderBlockStartWidth(SpecifiedValue)border-block-start-width
BorderBlockEndColor(SpecifiedValue)border-block-end-color
BorderBlockEndStyle(SpecifiedValue)border-block-end-style
BorderBlockEndWidth(SpecifiedValue)border-block-end-width
BorderInlineStartColor(SpecifiedValue)border-inline-start-color
BorderInlineStartStyle(SpecifiedValue)border-inline-start-style
BorderInlineStartWidth(SpecifiedValue)border-inline-start-width
BorderInlineEndColor(SpecifiedValue)border-inline-end-color
BorderInlineEndStyle(SpecifiedValue)border-inline-end-style
BorderInlineEndWidth(SpecifiedValue)border-inline-end-width
BorderTopLeftRadius(Box<SpecifiedValue>)border-top-left-radius
BorderTopRightRadius(Box<SpecifiedValue>)border-top-right-radius
BorderBottomRightRadius(Box<SpecifiedValue>)border-bottom-right-radius
BorderBottomLeftRadius(Box<SpecifiedValue>)border-bottom-left-radius
BorderImageSource(Box<SpecifiedValue>)border-image-source
BorderImageOutset(Box<SpecifiedValue>)border-image-outset
BorderImageRepeat(SpecifiedValue)border-image-repeat
BorderImageWidth(Box<SpecifiedValue>)border-image-width
BorderImageSlice(Box<SpecifiedValue>)border-image-slice
Display(SpecifiedValue)display
Position(SpecifiedValue)position
Float(SpecifiedValue)float
Clear(SpecifiedValue)clear
ServoDisplayForHypotheticalBox(SpecifiedValue)-servo-display-for-hypothetical-box
VerticalAlign(SpecifiedValue)vertical-align
ServoOverflowClipBox(SpecifiedValue)-servo-overflow-clip-box
OverflowX(SpecifiedValue)overflow-x
OverflowY(SpecifiedValue)overflow-y
TransitionDuration(SpecifiedValue)transition-duration
TransitionTimingFunction(SpecifiedValue)transition-timing-function
TransitionProperty(SpecifiedValue)transition-property
TransitionDelay(SpecifiedValue)transition-delay
AnimationName(SpecifiedValue)animation-name
AnimationDuration(SpecifiedValue)animation-duration
AnimationTimingFunction(SpecifiedValue)animation-timing-function
AnimationIterationCount(SpecifiedValue)animation-iteration-count
AnimationDirection(SpecifiedValue)animation-direction
AnimationPlayState(SpecifiedValue)animation-play-state
AnimationFillMode(SpecifiedValue)animation-fill-mode
AnimationDelay(SpecifiedValue)animation-delay
Transform(SpecifiedValue)transform
Perspective(SpecifiedValue)perspective
PerspectiveOrigin(Box<SpecifiedValue>)perspective-origin
BackfaceVisibility(SpecifiedValue)backface-visibility
TransformStyle(SpecifiedValue)transform-style
TransformOrigin(Box<SpecifiedValue>)transform-origin
Color(SpecifiedValue)color
ColumnWidth(SpecifiedValue)column-width
ColumnCount(SpecifiedValue)column-count
ColumnGap(SpecifiedValue)column-gap
Content(Box<SpecifiedValue>)content
CounterIncrement(SpecifiedValue)counter-increment
CounterReset(SpecifiedValue)counter-reset
Opacity(SpecifiedValue)opacity
BoxShadow(SpecifiedValue)box-shadow
Clip(Box<SpecifiedValue>)clip
Filter(SpecifiedValue)filter
MixBlendMode(SpecifiedValue)mix-blend-mode
FontFamily(SpecifiedValue)font-family
FontStyle(SpecifiedValue)font-style
FontVariantCaps(SpecifiedValue)font-variant-caps
FontWeight(SpecifiedValue)font-weight
FontSize(SpecifiedValue)font-size
FontStretch(SpecifiedValue)font-stretch
Visibility(SpecifiedValue)visibility
WritingMode(SpecifiedValue)writing-mode
Direction(SpecifiedValue)direction
ImageRendering(SpecifiedValue)image-rendering
BorderCollapse(SpecifiedValue)border-collapse
EmptyCells(SpecifiedValue)empty-cells
CaptionSide(SpecifiedValue)caption-side
BorderSpacing(Box<SpecifiedValue>)border-spacing
LineHeight(SpecifiedValue)line-height
TextTransform(SpecifiedValue)text-transform
TextIndent(SpecifiedValue)text-indent
OverflowWrap(SpecifiedValue)overflow-wrap
WordBreak(SpecifiedValue)word-break
TextJustify(SpecifiedValue)text-justify
TextAlign(SpecifiedValue)text-align
LetterSpacing(SpecifiedValue)letter-spacing
WordSpacing(SpecifiedValue)word-spacing
ServoTextDecorationsInEffect(SpecifiedValue)-servo-text-decorations-in-effect
WhiteSpace(SpecifiedValue)white-space
TextShadow(SpecifiedValue)text-shadow
TextRendering(SpecifiedValue)text-rendering
ListStylePosition(SpecifiedValue)list-style-position
ListStyleType(SpecifiedValue)list-style-type
ListStyleImage(SpecifiedValue)list-style-image
Quotes(SpecifiedValue)quotes
MarginTop(SpecifiedValue)margin-top
MarginLeft(SpecifiedValue)margin-left
MarginBottom(SpecifiedValue)margin-bottom
MarginRight(SpecifiedValue)margin-right
MarginBlockStart(SpecifiedValue)margin-block-start
MarginBlockEnd(SpecifiedValue)margin-block-end
MarginInlineStart(SpecifiedValue)margin-inline-start
MarginInlineEnd(SpecifiedValue)margin-inline-end
OutlineColor(SpecifiedValue)outline-color
OutlineStyle(SpecifiedValue)outline-style
OutlineWidth(SpecifiedValue)outline-width
OutlineOffset(SpecifiedValue)outline-offset
PaddingTop(SpecifiedValue)padding-top
PaddingLeft(SpecifiedValue)padding-left
PaddingBottom(SpecifiedValue)padding-bottom
PaddingRight(SpecifiedValue)padding-right
PaddingBlockStart(SpecifiedValue)padding-block-start
PaddingBlockEnd(SpecifiedValue)padding-block-end
PaddingInlineStart(SpecifiedValue)padding-inline-start
PaddingInlineEnd(SpecifiedValue)padding-inline-end
Cursor(SpecifiedValue)cursor
PointerEvents(SpecifiedValue)pointer-events
Top(SpecifiedValue)top
Left(SpecifiedValue)left
Bottom(SpecifiedValue)bottom
Right(SpecifiedValue)right
OffsetBlockStart(SpecifiedValue)offset-block-start
OffsetBlockEnd(SpecifiedValue)offset-block-end
OffsetInlineStart(SpecifiedValue)offset-inline-start
OffsetInlineEnd(SpecifiedValue)offset-inline-end
ZIndex(SpecifiedValue)z-index
FlexDirection(SpecifiedValue)flex-direction
FlexWrap(SpecifiedValue)flex-wrap
JustifyContent(SpecifiedValue)justify-content
AlignContent(SpecifiedValue)align-content
AlignItems(SpecifiedValue)align-items
FlexGrow(SpecifiedValue)flex-grow
FlexShrink(SpecifiedValue)flex-shrink
AlignSelf(SpecifiedValue)align-self
Order(SpecifiedValue)order
FlexBasis(SpecifiedValue)flex-basis
Width(SpecifiedValue)width
MinWidth(SpecifiedValue)min-width
MaxWidth(SpecifiedValue)max-width
Height(SpecifiedValue)height
MinHeight(SpecifiedValue)min-height
MaxHeight(SpecifiedValue)max-height
BlockSize(SpecifiedValue)block-size
MinBlockSize(SpecifiedValue)min-block-size
MaxBlockSize(SpecifiedValue)max-block-size
InlineSize(SpecifiedValue)inline-size
MinInlineSize(SpecifiedValue)min-inline-size
MaxInlineSize(SpecifiedValue)max-inline-size
BoxSizing(SpecifiedValue)box-sizing
TableLayout(SpecifiedValue)table-layout
TextOverflow(Box<SpecifiedValue>)text-overflow
UnicodeBidi(SpecifiedValue)unicode-bidi
TextDecorationLine(SpecifiedValue)text-decoration-line
CSSWideKeyword(LonghandId, CSSWideKeyword)A css-wide keyword.
WithVariables(LonghandId, Arc<UnparsedValue>)An unparsed value that contains var() functions.
Custom(Name, DeclaredValueOwned<Arc<SpecifiedValue>>)A custom property declaration, with the property name and the declared value.
Methods
impl PropertyDeclaration[src]
pub fn id(&self) -> PropertyDeclarationId[src]
Given a property declaration, return the property declaration id.
pub fn get_css_wide_keyword(&self) -> Option<CSSWideKeyword>[src]
Returns a CSS-wide keyword if the declaration's value is one.
pub fn is_default_line_height(&self) -> bool[src]
Is it the default value of line-height?
pub fn get_system(&self) -> Option<()>[src]
Dummy method to avoid cfg()s
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 shorthands(&self) -> &'static [ShorthandId][src]
The shorthands that this longhand is part of.
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,
name: CowRcStr<'i>,
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<(), ParseError<'i>>[src]
declarations: &mut SourcePropertyDeclaration,
id: PropertyId,
name: CowRcStr<'i>,
context: &ParserContext,
input: &mut Parser<'i, 't>
) -> Result<(), ParseError<'i>>
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-stateproperty 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]
fn clone(&self) -> PropertyDeclaration[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl PartialEq for PropertyDeclaration[src]
fn eq(&self, __arg_0: &PropertyDeclaration) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &PropertyDeclaration) -> bool[src]
This method tests for !=.
impl Debug for PropertyDeclaration[src]
fn fmt(&self, f: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more