Skip to main content

Crate azul_css

Crate azul_css 

Source
Expand description

Provides datatypes used to describe an application’s style using the Azul GUI framework.

§Modules

  • css: Stylesheet types (rules, selectors, declarations).
  • props: Typed CSS property values (colors, lengths, layout properties).
  • parser2: CSS string parsing (feature-gated behind "parser").
  • system: Native OS theme discovery and system colors.
  • shape: Text shaping and glyph layout.
  • shape_parser: Font and shape metric parsing.
  • dynamic_selector: Runtime selector matching helpers.
  • compact_cache: Compact caching utilities for resolved styles.
  • corety: Core type aliases re-exported at crate root.

Re-exports§

pub use self::corety::*;

Modules§

codegen
Multi-language code generation backends (Rust, C++, Python). Multi-language code generation backends for parsed CSS.
compact_cache
Three-tier numeric property cache for fast style resolution. Compact layout property cache — three-tier numeric encoding
corety
FFI-safe core type aliases (AzString, AzVec, OptionT, etc.). Core FFI-safe types used across crate boundaries.
css
Stylesheet types: rules, selectors, declarations, and specificity. Types and methods used to describe the style of an application.
defaults
Typed default values for CSS properties (font size, font id, text color). Aggregated default values for typed CSS properties.
dynamic_selector
Runtime CSS selector matching (:hover, @os, @media, etc.). Dynamic CSS selectors for runtime evaluation based on OS, media queries, container queries, etc.
format_rust_code
Const-compatible Rust source code generation from parsed CSS. Generates const-compatible Rust source code from parsed CSS values.
macros
Internal macros for reducing boilerplate in property definitions. Macros for generating C-ABI-compatible collection types (Vec, Option, Result) used throughout the codebase for FFI interop. Each macro produces #[repr(C)] types with a destructor model: DefaultRust (library-owned), NoDestructor (&'static), External (caller-provided destructor fn), and AlreadyDestroyed (post-drop guard).
parser2
CSS string parser (tokenizer, declaration parser, shorthand expansion). High-level types and functions related to CSS parsing.
props
Typed CSS property values: colors, lengths, layout, backgrounds, etc. Contains all CSS property definitions, organized by category.
shape
CSS Shape data structures (shape-inside, shape-outside, clip-path). CSS Shape data structures for shape-inside, shape-outside, and clip-path
shape_parser
Parser for CSS shape functions and font metrics. CSS Shape parsing for shape-inside, shape-outside, and clip-path
system
Native OS theme discovery: system colors, fonts, and DPI. Discovers system-native styling for colors, fonts, and other metrics.

Macros§

impl_debug_as_display
Implements Debug to use Display instead - assumes the that the type has implemented Display
impl_display
Implement Display for an enum.
impl_option
impl_option_inner
impl_result
impl_result_inner
impl_vec
impl_vec_as_hashmap
impl_vec_clone
impl_vec_debug
impl_vec_eq
impl_vec_hash
impl_vec_mut
NOTE: impl_vec_mut can only exist for vectors that are known to be library-allocated!
impl_vec_ord
impl_vec_partialeq
impl_vec_partialord