Struct style::properties::declaration_block::PropertyDeclarationBlock [] [src]

pub struct PropertyDeclarationBlock { /* fields omitted */ }

Overridden declarations are skipped.

Methods

impl PropertyDeclarationBlock
[src]

[src]

Returns the number of declarations in the block.

[src]

Create an empty block

[src]

Create a block with a single declaration

Important traits for &'a mut [u8]
[src]

The declarations in this block

[src]

The important flags for declarations in this block

Important traits for DeclarationImportanceIterator<'a>
[src]

Iterate over (PropertyDeclaration, Importance) pairs

Important traits for NormalDeclarationIterator<'a>
[src]

Iterate over PropertyDeclaration for Importance::Normal

Important traits for AnimationValueIterator<'a, 'cx, 'cx_a>
[src]

Return an iterator of (AnimatableLonghand, AnimationValue).

[src]

Returns whether this block contains any declaration with !important.

This is based on the declarations_importance bit-vector, which should be maintained whenever declarations is changed.

[src]

Returns whether this block contains any declaration without !important.

This is based on the declarations_importance bit-vector, which should be maintained whenever declarations is changed.

[src]

Returns whether this block contains a declaration of a given longhand.

[src]

Get a declaration for a given property.

NOTE: This is linear time.

[src]

Find the value of the given property in this block and serialize it

https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-getpropertyvalue

[src]

[src]

Adds or overrides the declaration for a given property in this block.

See the documentation of push to see what impact source has when the property is already there.

[src]

Adds or overrides the declaration for a given property in this block.

Depending on the value of source, this has a different behavior in the presence of another declaration with the same ID in the declaration block.

  • For DeclarationSource::Parsing, this will not override a declaration with more importance, and will ensure that, if inserted, it's inserted at the end of the declaration block.

  • For DeclarationSource::CssOm, this will override importance and will preserve the original position on the block.

[src]

Set the declaration importance for a given property, if found.

Returns whether any declaration was updated.

[src]

https://dev.w3.org/csswg/cssom/#dom-cssstyledeclaration-removeproperty

Returns whether any declaration was actually removed.

[src]

Take a declaration block known to contain a single property and serialize it.

[src]

Returns a custom properties map which is the result of cascading custom properties in this declaration block along with context's custom properties.

[src]

Returns a custom properties map which is the result of cascading custom properties in this declaration block along with the given custom properties.

Trait Implementations

impl Clone for PropertyDeclarationBlock
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for PropertyDeclarationBlock
[src]

[src]

Formats the value using the given formatter. Read more

impl ToCss for PropertyDeclarationBlock
[src]

[src]

Serialize self in CSS syntax, writing to dest.

[src]

Serialize self in CSS syntax and return a string. Read more