Skip to main content

Crate bun_css

Crate bun_css 

Source

Re-exports§

pub use context::DeclarationContext;
pub use context::PropertyHandlerContext;
pub use context::SupportsEntry;
pub use declaration::DeclarationBlock;
pub use declaration::DeclarationHandler;
pub use declaration::DeclarationList;
pub use properties as css_properties;
pub use rules as css_rules;
pub use selectors::selector;
pub use values as css_values;
pub use css_parser::CssRef;
pub use css_parser::CssRefTag;
pub use css_parser::CssResult as Result;
pub use css_parser::Delimiters;
pub use css_parser::EnumProperty;
pub use css_parser::IntoParserError;
pub use css_parser::ParserState;
pub use css_parser::enum_property_util;
pub use css_parser::nth;
pub use css_parser::parse_utility;
pub use css_parser::signfns;
pub use css_parser::void_wrap;
pub use compat::Feature;
pub use error::ParserErrorKind as ParseErrorKind;
pub use error::ParserErrorKind as ErrorKind;
pub use properties::custom::TokenList;
pub use properties::custom::TokenListFns;
pub use values::ident::IdentFns;
pub use values::string::CssString as CSSString;
pub use values::string::CssStringFns as CSSStringFns;
pub use generics as generic;
pub use generics::implement_deep_clone;
pub use generics::implement_eql;
pub use generics::implement_hash;
pub use generics::CssEql;
pub use generics::DeepClone;
pub use css_parser::dtoa_short;
pub use css_parser::f32_length_with_5_digits;
pub use css_parser::serializer;
pub use css_parser::to_css;
pub use dependencies::Dependency;
pub use css_parser::DefaultAtRule;
pub use css_parser::LocalsResultsMap;
pub use css_parser::MinifyOptions;
pub use css_parser::Parser;
pub use css_parser::ParserFlags;
pub use css_parser::ParserInput;
pub use css_parser::ParserOptions;
pub use css_parser::StyleAttribute;
pub use css_parser::StyleSheet;
pub use css_parser::StylesheetExtra;
pub use css_parser::ToCssResult;
pub use printer::ImportInfo;
pub use printer::Printer;
pub use printer::PrinterOptions;
pub use printer::PseudoClasses;
pub use values::color::CssColor;
pub use values::color::FloatColor;
pub use values::color::LABColor;
pub use values::color::LabColor;
pub use values::color::PredefinedColor;
pub use values::color::RGBA;
pub use values_stub::color::CssColorParseResult;
pub use error::BasicParseError;
pub use error::BasicParseErrorKind;
pub use error::Err;
pub use error::ErrorLocation;
pub use error::MinifyError;
pub use error::MinifyErrorKind;
pub use error::ParseError;
pub use error::ParserError;
pub use error::ParserErrorKind;
pub use error::PrinterError;
pub use error::PrinterErrorKind;
pub use error::SelectorError;
pub use logical::LogicalGroup;
pub use logical::PropertyCategory;
pub use targets::Browsers;
pub use targets::Features;
pub use targets::Targets;
pub use css_parser::BundlerStyleSheet;
pub use properties::PropertyIdTag;
pub use rules::import::ImportConditions;

Modules§

compat
context
css_modules
css_parser
CSS parser — port of src/css/css_parser.zig.
declaration
dependencies
CSS dependency tracking — @import and url() references collected during printing.
error
generics
Generic trait-based dispatch for CSS value operations.
logical
media_query
CSS media queries.
prefixes
printer
properties
CSS property definitions.
rules
selectors
CSS selector parsing and serialization.
small_list
sourcemap
targets
values
values_stub
Data-only value-type stubs re-exported through values::{color,ident,url} while the real values/*.rs files stay gated on the calc lattice. These were the previous gated_mod!(values, ...) body — now a real module so printer.rs / css_parser.rs can name the types.

Macros§

css_eql_partialeq
Stamp impl CssEql for $T forwarding to PartialEq::eq.
impl_parse_tocss_via_inherent
match_ignore_ascii_case
Case-insensitive ASCII byte-slice dispatch — the fix for Zig’s css.todo_stuff.match_ignore_ascii_case sentinel and a drop-in port of rust-cssparser’s match_ignore_ascii_case!.

Structs§

Dimension
Location
Cross-source location (carries a source-map source index).
Num
SmallList
SourceLocation
Line/column within a single source. Column is 1-based, line is 0-based.
VendorPrefix

Enums§

Maybe
Result is a type that represents either success (Ok) or failure (Err).
PrintErr
Hoisted from css_parser.rs (gated). Single-variant error type returned by every to_css path; the kind lives in Printer.error_kind (PrinterError) — this is just the bubbled signal.
Token
CSS lexer token. Data-only definition hoisted out of css_parser.rs; the to_css*/eql/hash impls stay in css_parser.rs (gated) since they depend on serializer::* and generics.

Type Aliases§

ArenaBox
ArenaVec
Error
ImportRecordHandler
Dependent crates name this ImportRecordHandler (Zig had a now-removed union of the same name in css_parser.zig:3783); the surviving type is printer::ImportInfo, exposed under both names.

Derive Macros§

CssEql
#[derive(CssEql)] — field-wise / variant-wise port of Zig’s css.implementEql. See src/css_derive/lib.rs for the expansion rules. Re-exported here so use crate::generics::CssEql; brings both trait and derive into scope (same-name idiom, cf. Clone).
DeepClone
#[derive(DeepClone)] — field-wise / variant-wise port of Zig’s css.implementDeepClone. See src/css_derive/lib.rs for the expansion rules. Re-exported here so use crate::generics::DeepClone; brings both the trait and the derive into scope (same-name trait+derive is the std idiom, cf. Clone).
DefineEnumProperty
Parse
ToCss