"Error while parsing: \"{}: {};\": var() cannot be used on shorthand properties - use `{}-top` or `{}-x` as the key instead: ",
/// Returns an error if `selector` (with optional `value`) is not a recognized CSS pseudo-selector.
UnsupportedKeyValuePair { key, value } => format!("Unsupported CSS property: \"{}: {}\"", key, value),
SkippedDeclaration { key, value, error } => format!("Skipped declaration '{}:{}': {}", key, value, error),
// Parse more complex media queries like "(min-width: 800px)" or "screen and (max-width: 600px)"
#[allow(clippy::too_many_lines, clippy::cognitive_complexity)] // large but cohesive: single-purpose
let mut current_declarations: BTreeMap<&str, (&str, ErrorLocationRange)> = BTreeMap::new();
let (stylesheet, mut block_warnings) = css_blocks_to_stylesheet(css_blocks, css_string);
/// property's type (taken from the `var()`'s parsed fallback). Otherwise — undefined `var()`
for (unparsed_css_key, (unparsed_css_value, location)) in &unparsed_css_block.declarations {
if let Some(combined_key) = CombinedCssPropertyType::from_str(unparsed_css_key, css_key_map) {
} else if let Some(normal_key) = CssPropertyType::from_str(unparsed_css_key, css_key_map) {
match parse_declaration_resilient(unparsed_css_key, unparsed_css_value, location, css_key_map) {