[−][src]Enum style::properties::PropertyDeclaration
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
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
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
perspective-origin
Quotes(Quotes)quotes
rotate
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
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
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]
declarations: &mut SourcePropertyDeclaration,
id: PropertyId,
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) -> Self[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Debug for PropertyDeclaration[src]
impl MallocSizeOf for PropertyDeclaration[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
impl PartialEq<PropertyDeclaration> for PropertyDeclaration[src]
impl ToShmem for PropertyDeclaration[src]
fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> Result<Self>[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[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]
U: From<T>,
impl<T> MaybeBoxed<Box<T>> for T[src]
fn maybe_boxed(Self) -> Box<T>[src]
impl<T> MaybeBoxed<T> for T[src]
fn maybe_boxed(Self) -> 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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>, [src]
V: MultiLane<T>,