Module style

Source
Expand description

Colors, layout lengths, flex, theme, and box styling.

§Examples

use ailloli_ui_core::style::{Color, Length};
assert_eq!(Length::percent(50.0).resolve(100.0), Some(50.0));
assert_eq!(Color::WHITE.as_rgba8(), (255, 255, 255, 255));

Visual and layout styling types (no paint implementation).

Widgets combine layout/flex/box styles with Color and Theme tokens. Layout resolution: ResolvedLayout, resolve_widget_size (see layout_resolve module).

Re-exports§

pub use background::Background;
pub use border::Border;
pub use border::BorderStyle;
pub use border::EdgeColors;
pub use box_model::BoxModel;
pub use box_style::BoxStyle;
pub use color::Rgba;Deprecated
pub use color::Color;
pub use color::ColorParseError;
pub use cursor::CursorStyle;
pub use flex_item_style::FlexItemStyle;
pub use flex_style::AlignItems;
pub use flex_style::FlexDirection;
pub use flex_style::FlexStyle;
pub use flex_style::JustifyContent;
pub use interaction::InteractionState;
pub use interaction::StateStyle;
pub use layout_resolve::resolve_widget_size;
pub use layout_resolve::ResolvedLayout;
pub use layout_size_hint::LayoutSizeHint;
pub use layout_style::LayoutStyle;
pub use length::Length;
pub use opacity::Opacity;
pub use radius::Radius;
pub use shadow::BoxShadow;
pub use shadow::Shadow;Deprecated
pub use stroke::LineCap;
pub use stroke::LineJoin;
pub use stroke::StrokeStyle;
pub use text_style::TextDecoration;
pub use text_style::TextStyle;
pub use theme::Theme;
pub use theme::ThemePalette;
pub use theme::ThemeRadius;
pub use theme::ThemeShadows;
pub use theme::ThemeSpacing;
pub use theme::ThemeState;
pub use theme::ThemeTypography;

Modules§

background
Optional solid box backgrounds.
border
Per-edge border appearance and inner geometry.
box_model
Composable margin and padding.
box_style
Background, border, radius, shadow, and opacity bundles.
color
Linear-RGBA colors and sRGB conversion.
cursor
Platform cursor hints.
flex_item_style
Per-child flex behavior.
flex_style
Flex-container direction, alignment, and distribution.
interaction
Interaction flags and state-style resolution.
layout_resolve
Declarative-length resolution against constraints.
layout_size_hint
Compact width/height hints for parent layouts.
layout_style
Per-widget dimensions, bounds, margin, and padding.
length
Intrinsic, fixed, fill, and percentage lengths.
opacity
Clamped widget opacity multipliers.
radius
Per-corner box radii.
shadow
Outer and inset box-shadow geometry.
stroke
Line cap, join, and stroke parameters.
text_style
Text font, size, color, and decoration.
theme
Built-in semantic design tokens.