Enum style::properties::ShorthandId
[−]
[src]
pub enum ShorthandId {
Background,
BackgroundPosition,
BorderColor,
BorderStyle,
BorderWidth,
BorderTop,
BorderLeft,
BorderBottom,
BorderRight,
BorderBlockStart,
BorderBlockEnd,
BorderInlineStart,
BorderInlineEnd,
Border,
BorderRadius,
BorderImage,
Overflow,
Transition,
Animation,
Columns,
Font,
FontVariant,
ListStyle,
Margin,
Outline,
Padding,
FlexFlow,
Flex,
TextDecoration,
All,
}An identifier for a given shorthand property.
Variants
Backgroundbackground
BackgroundPositionbackground-position
BorderColorborder-color
BorderStyleborder-style
BorderWidthborder-width
BorderTopborder-top
BorderLeftborder-left
BorderBottomborder-bottom
BorderRightborder-right
BorderBlockStartborder-block-start
BorderBlockEndborder-block-end
BorderInlineStartborder-inline-start
BorderInlineEndborder-inline-end
Borderborder
BorderRadiusborder-radius
BorderImageborder-image
Overflowoverflow
Transitiontransition
Animationanimation
Columnscolumns
Fontfont
FontVariantfont-variant
ListStylelist-style
Marginmargin
Outlineoutline
Paddingpadding
FlexFlowflex-flow
Flexflex
TextDecorationtext-decoration
Allall
Methods
impl ShorthandId[src]
pub fn name(&self) -> &'static str[src]
Get the name for this shorthand property.
pub fn longhands(&self) -> &'static [LonghandId][src]
Get the longhand ids that form this shorthand.
pub fn longhands_to_css<'a, W, I>(
&self,
declarations: I,
dest: &mut W
) -> Result where
W: Write,
I: Iterator<Item = &'a PropertyDeclaration>, [src]
&self,
declarations: I,
dest: &mut W
) -> Result where
W: Write,
I: Iterator<Item = &'a PropertyDeclaration>,
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.
pub fn get_shorthand_appendable_value<'a, I>(
self,
declarations: I
) -> Option<AppendableValue<'a, I::IntoIter>> where
I: IntoIterator<Item = &'a PropertyDeclaration>,
I::IntoIter: Clone, [src]
self,
declarations: I
) -> Option<AppendableValue<'a, I::IntoIter>> where
I: IntoIterator<Item = &'a PropertyDeclaration>,
I::IntoIter: Clone,
Finds and returns an appendable value for the given declarations.
Returns the optional appendable value.
pub fn flags(&self) -> PropertyFlags[src]
Returns PropertyFlags for given shorthand property.
Trait Implementations
impl From<ShorthandId> for NonCustomPropertyId[src]
fn from(id: ShorthandId) -> Self[src]
Performs the conversion.
impl Clone for ShorthandId[src]
fn clone(&self) -> ShorthandId[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 Copy for ShorthandId[src]
impl Debug for ShorthandId[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Eq for ShorthandId[src]
impl Hash for ShorthandId[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl MallocSizeOf for ShorthandId[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
impl PartialEq for ShorthandId[src]
fn eq(&self, __arg_0: &ShorthandId) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.