pub struct StyleContext {
pub viewport_width: f32,
pub viewport_height: f32,
pub device_pixel_ratio: f32,
pub inherited_style: Option<ComputedStyle>,
pub component_id: Option<ComponentId>,
pub theme_variables: HashMap<String, String>,
pub performance_monitoring: bool,
}
Expand description
Style resolution context for computing styles
Fields§
§viewport_width: f32
Viewport dimensions
viewport_height: f32
§device_pixel_ratio: f32
Device pixel ratio
inherited_style: Option<ComputedStyle>
Inherited styles from parent
component_id: Option<ComponentId>
Component ID for scoped styles
theme_variables: HashMap<String, String>
Current theme variables
performance_monitoring: bool
Performance monitoring enabled
Trait Implementations§
Source§impl Debug for StyleContext
impl Debug for StyleContext
Auto Trait Implementations§
impl Freeze for StyleContext
impl RefUnwindSafe for StyleContext
impl Send for StyleContext
impl Sync for StyleContext
impl Unpin for StyleContext
impl UnwindSafe for StyleContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more