Enum style::properties::ShorthandId
source · #[repr(u16)]
pub enum ShorthandId {
Show 45 variants
Background,
BackgroundPosition,
BorderColor,
BorderStyle,
BorderWidth,
BorderTop,
BorderRight,
BorderBottom,
BorderLeft,
BorderBlockStart,
BorderBlockEnd,
BorderInlineStart,
BorderInlineEnd,
Border,
BorderRadius,
BorderImage,
BorderBlockWidth,
BorderBlockStyle,
BorderBlockColor,
BorderInlineWidth,
BorderInlineStyle,
BorderInlineColor,
BorderBlock,
BorderInline,
Overflow,
Columns,
Font,
FontVariant,
ListStyle,
Margin,
MarginBlock,
MarginInline,
Outline,
Padding,
PaddingBlock,
PaddingInline,
FlexFlow,
Flex,
Inset,
InsetBlock,
InsetInline,
TextDecoration,
Transition,
Animation,
All,
}
Expand description
An identifier for a given shorthand property.
Variants§
Background
background
BackgroundPosition
background-position
BorderColor
border-color
BorderStyle
border-style
BorderWidth
border-width
BorderTop
border-top
BorderRight
border-right
BorderBottom
border-bottom
BorderLeft
border-left
BorderBlockStart
border-block-start
BorderBlockEnd
border-block-end
BorderInlineStart
border-inline-start
BorderInlineEnd
border-inline-end
Border
border
BorderRadius
border-radius
BorderImage
border-image
BorderBlockWidth
border-block-width
BorderBlockStyle
border-block-style
BorderBlockColor
border-block-color
BorderInlineWidth
border-inline-width
BorderInlineStyle
border-inline-style
BorderInlineColor
border-inline-color
BorderBlock
border-block
BorderInline
border-inline
Overflow
overflow
Columns
columns
Font
font
FontVariant
font-variant
ListStyle
list-style
Margin
margin
MarginBlock
margin-block
MarginInline
margin-inline
Outline
outline
Padding
padding
PaddingBlock
padding-block
PaddingInline
padding-inline
FlexFlow
flex-flow
Flex
flex
Inset
inset
InsetBlock
inset-block
InsetInline
inset-inline
TextDecoration
text-decoration
Transition
transition
Animation
animation
All
all
Implementations§
source§impl ShorthandId
impl ShorthandId
sourcepub fn longhands(&self) -> NonCustomPropertyIterator<LonghandId> ⓘ
pub fn longhands(&self) -> NonCustomPropertyIterator<LonghandId> ⓘ
Get the longhand ids that form this shorthand.
sourcepub fn longhands_to_css(
&self,
declarations: &[&PropertyDeclaration],
dest: &mut CssStringWriter
) -> Result
pub fn longhands_to_css(
&self,
declarations: &[&PropertyDeclaration],
dest: &mut CssStringWriter
) -> Result
Try to serialize the given declarations as this shorthand.
Returns an error if writing to the stream fails, or if the declarations do not map to a shorthand.
sourcepub fn get_shorthand_appendable_value<'a, 'b: 'a>(
self,
declarations: &'a [&'b PropertyDeclaration]
) -> Option<AppendableValue<'a, 'b>>
pub fn get_shorthand_appendable_value<'a, 'b: 'a>(
self,
declarations: &'a [&'b PropertyDeclaration]
) -> Option<AppendableValue<'a, 'b>>
Finds and returns an appendable value for the given declarations.
Returns the optional appendable value.
sourcepub fn flags(self) -> PropertyFlags
pub fn flags(self) -> PropertyFlags
Returns PropertyFlags for the given shorthand property.
sourcepub fn is_legacy_shorthand(self) -> bool
pub fn is_legacy_shorthand(self) -> bool
Returns whether this property is a legacy shorthand.
sourcepub fn idl_name_sort_order(self) -> u32
pub fn idl_name_sort_order(self) -> u32
Returns the order in which this property appears relative to other shorthands in idl-name-sorting order.
fn parse_into<'i, 't>(
&self,
declarations: &mut SourcePropertyDeclaration,
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>
) -> Result<(), ParseError<'i>>
Trait Implementations§
source§impl Clone for ShorthandId
impl Clone for ShorthandId
source§fn clone(&self) -> ShorthandId
fn clone(&self) -> ShorthandId
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShorthandId
impl Debug for ShorthandId
source§impl From<ShorthandId> for NonCustomPropertyId
impl From<ShorthandId> for NonCustomPropertyId
source§fn from(id: ShorthandId) -> Self
fn from(id: ShorthandId) -> Self
source§impl Hash for ShorthandId
impl Hash for ShorthandId
source§impl MallocSizeOf for ShorthandId
impl MallocSizeOf for ShorthandId
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl PartialEq<ShorthandId> for ShorthandId
impl PartialEq<ShorthandId> for ShorthandId
source§fn eq(&self, other: &ShorthandId) -> bool
fn eq(&self, other: &ShorthandId) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ToComputedValue for ShorthandId
impl ToComputedValue for ShorthandId
§type ComputedValue = ShorthandId
type ComputedValue = ShorthandId
source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Context
.source§impl ToCss for ShorthandId
impl ToCss for ShorthandId
source§impl ToResolvedValue for ShorthandId
impl ToResolvedValue for ShorthandId
§type ResolvedValue = ShorthandId
type ResolvedValue = ShorthandId
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
source§impl ToShmem for ShorthandId
impl ToShmem for ShorthandId
impl Copy for ShorthandId
impl Eq for ShorthandId
impl StructuralEq for ShorthandId
impl StructuralPartialEq for ShorthandId
Auto Trait Implementations§
impl RefUnwindSafe for ShorthandId
impl Send for ShorthandId
impl Sync for ShorthandId
impl Unpin for ShorthandId
impl UnwindSafe for ShorthandId
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.