Skip to main content

StyleOwner

Trait StyleOwner 

Source
pub trait StyleOwner: 'static {
    const RANK: u8;
}
Expand description

A runtime system that holds style values on elements.

Implemented on a type the system owns (usually the component that marks what it drives), which names its layer in StyleOverrides.

Required Associated Constants§

Source

const RANK: u8

Where the owner’s values sit: a higher rank lays over a lower one.

The shipped systems use, lowest first: 10 for a CSS transition tween, 20 for a widget’s own state fill (a toggle’s checked track, a selected tab) and for the layout holders, 30 for the :disabled / :drag-over state patches, 40 for the hover tint, 50 for the press tint, 60 for the hover and focus borders.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§