Skip to main content

StyleProps

Struct StyleProps 

Source
pub struct StyleProps;
Expand description

Zero-cost IDE Go-to-Definition schema namespace for style! and view! style: { ... } property keys.

Implementations§

Source§

impl StyleProps

Zero-cost IDE Go-to-Definition property anchors for StyleProps.

Source

pub const fn direction()

Sets flex main-axis direction (row, column, or FlexDirection).

Source

pub const fn display()

Sets box display mode (Display::Flex, Display::Grid, Display::Block, Display::None).

Source

pub const fn position()

Sets positioning mode (Position::Relative, Position::Absolute, Position::Fixed).

Source

pub const fn inset()

Sets (top, right, bottom, left) offsets as (Option<f32>, Option<f32>, Option<f32>, Option<f32>).

Source

pub const fn width()

Sets box width (Length::Px, Length::Percent, Length::Auto).

Source

pub const fn height()

Sets box height (Length::Px, Length::Percent, Length::Auto).

Source

pub const fn min_width()

Sets minimum box width constraint (Length).

Source

pub const fn min_height()

Sets minimum box height constraint (Length).

Source

pub const fn max_width()

Sets maximum box width constraint (Length).

Source

pub const fn max_height()

Sets maximum box height constraint (Length).

Source

pub const fn aspect_ratio()

Sets preferred width-to-height aspect ratio (f32).

Source

pub const fn padding()

Sets inner box padding (Edges).

Source

pub const fn margin()

Sets outer box margin (Edges).

Source

pub const fn gap()

Sets uniform row and column child gap (f32).

Source

pub const fn background()

Sets solid background fill color (Color).

Source

pub const fn gradient()

Sets linear gradient background fill (LinearGradient).

Source

pub const fn shadow()

Sets drop shadow elevation (Shadow).

Source

pub const fn focus_ring()

Sets keyboard focus outline stroke (Border).

Source

pub const fn cursor()

Sets pointer hover cursor icon (CursorIcon).

Source

pub const fn pointer_events()

Controls pointer hit-testing participation (PointerEvents).

Source

pub const fn stop_scroll_propagation()

Blocks wheel/touch scroll bubbling to ancestor scroll containers (bool).

Source

pub const fn stop_event_propagation()

Blocks pointer and click event bubbling to ancestor nodes (bool).

Source

pub const fn color()

Sets foreground text color (Color).

Source

pub const fn radius()

Sets uniform corner radius in logical pixels (f32).

Source

pub const fn align()

Sets cross-axis child alignment (AlignItems).

Source

pub const fn justify()

Sets main-axis content justification (JustifyContent).

Source

pub const fn flex_grow()

Sets flex grow factor (f32).

Source

pub const fn flex_shrink()

Sets flex shrink factor (f32).

Source

pub const fn flex_wrap()

Sets flex line wrapping policy (FlexWrap).

Source

pub const fn overflow()

Sets child clipping or scroll behavior (Overflow).

Source

pub const fn font_size()

Sets text font size in logical pixels (f32).

Source

pub const fn font_weight()

Sets text font weight (FontWeight).

Source

pub const fn font_family()

Sets text font family (FontFamily::Sans, FontFamily::Serif, FontFamily::Monospace).

Source

pub const fn italic()

Enables or disables italic font slant (bool).

Source

pub const fn text_align()

Sets horizontal text alignment (TextAlign).

Source

pub const fn text_overflow()

Sets text overflow strategy (TextOverflow::Wrap, TextOverflow::Clip, TextOverflow::Ellipsis).

Source

pub const fn selectable()

Enables or disables native text selection (bool, inherited by descendant text nodes unless overridden).

Source

pub const fn text_select()

Sets the interactive text selection and copy mode (TextSelectMode, inherited by descendant text nodes unless overridden).

Source

pub const fn selection_color()

Sets the highlight fill color used for selected text ranges (Color).

Source

pub const fn opacity()

Sets subtree opacity multiplier in [0.0, 1.0] (f32).

Source

pub const fn z_index()

Sets sibling/portal paint stacking order (i32).

Source

pub const fn border()

Sets border (width, color) tuple ((f32, Color)).

Source

pub const fn columns()

Sets uniform CSS Grid column count (u16).

Trait Implementations§

Source§

impl Clone for StyleProps

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StyleProps

Source§

impl Debug for StyleProps

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StyleProps

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for StyleProps

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for StyleProps

Source§

impl PartialEq for StyleProps

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for StyleProps

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for StyleProps

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.