Skip to main content

css_ast/values/non_standard/
mod.rs

1//! Non-standard CSS property value types.
2//!
3//! Non-standard aliases for standardised properties, kept for compatibility
4//! with legacy stylesheets.
5
6use super::prelude::*;
7
8/// Represents the style value for `word-wrap`.
9///
10/// Legacy alias for `overflow-wrap`. Accepts the same grammar.
11///
12/// The grammar is defined as:
13///
14/// ```text,ignore
15/// normal | break-word | anywhere
16/// ```
17#[syntax(" normal | break-word | anywhere ")]
18#[derive(
19	Parse, Peek, ToSpan, ToCursors, DeclarationMetadata, SemanticEq, Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash,
20)]
21#[declaration_metadata(
22    initial = "normal",
23    inherits,
24    applies_to = Text,
25    animation_type = Discrete,
26    property_group = Text,
27    computed_value_type = Unknown,
28    canonical_order = "n/a",
29)]
30#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
31#[cfg_attr(feature = "css_feature_data", derive(ToCSSFeature), css_feature("css.properties.overflow-wrap"))]
32#[cfg_attr(feature = "visitable", derive(Visitable), visit)]
33#[derive(csskit_derives::NodeWithMetadata)]
34pub enum WordWrapStyleValue {}