Expand description
§CSS Properties Module
This module defines the CSS properties that can be set on a style. It provides a structured way to create and manage CSS properties with type safety.
§Module Organization
The properties are organized into submodules by category:
color: Color-related properties (color, background-color)size: Size-related properties (width, height, margin, padding)display: Display and positioning propertiesfont: Typography-related propertiesborder: Border and outline propertiesposition: Positioning properties (top, right, bottom, left)layout: General layout properties (overflow, visibility)flex: Flexbox-specific propertiesgrid: Grid-specific propertiestransition: Transition and animation properties
§Usage
While you can use this module directly to create properties, it’s generally
easier to use the methods on the Style struct, which will call these
functions for you.
use mew_css::properties::{Property, color};
use mew_css::values::Color;
// Direct usage
let property = color::color(Color::Blue);
// More commonly, through the Style API
use mew_css::style;
let css = style().color(Color::Blue).apply();Modules§
- border
- Border properties
- color
- Color-related CSS properties.
- display
- Display properties
- flex
- Flex properties
- font
- Font properties
- grid
- Grid properties
- layout
- Layout properties
- position
- Position properties
- size
- Size properties
- size_
ext - Size properties extension
- transition
- Transition properties
Structs§
- Property
- Represents a single CSS property with a name and value.