@@ -1700,11 +1700,6 @@ fn attrs_to_css(
17001700 },
17011701
17021702 // Typography
1703− "line-height" => {
1704− if let Some(v) = val {
1705− push_css(&mut css, "line-height", &css_line_height(v));
1706− }
1707− }
17081703 "letter-spacing" => {
17091704 if let Some(v) = val {
17101705 push_css(&mut css, "letter-spacing", &css_px(v));
@@ -1987,23 +1982,6 @@ fn attrs_to_css(
19871982 }
19881983 }
19891984
1990− "content" => {
1991− if let Some(v) = val {
1992− // Wrap in quotes if not already quoted and not a CSS keyword
1993− if v.starts_with('"')
1994− || v.starts_with('\'')
1995− || v == "none"
1996− || v == "normal"
1997− || v.starts_with("attr(")
1998− || v.starts_with("counter(")
1999− {
2000− push_css(&mut css, "content", v);
2001− } else {
2002− push_css(&mut css, "content", &format!("\"{}\"", v));
2003− }
2004− }
2005− }
2006−
20071985 // --- CSS Shorthands ---
20081986 "line-clamp" => {
20091987 if let Some(v) = val {
@@ -2071,25 +2049,6 @@ fn css_px(value: &str) -> String {
20712049 }
20722050}
20732051
2074−/// Format a `line-height` value. CSS accepts either a unitless multiplier
2075−/// (e.g. `1.5`) or a length (e.g. `24px`). Plain integers in htmlang source
2076−/// are ambiguous: `[line-height 24]` was historically emitted as `24` (which
2077−/// CSS interprets as 24× font-size — almost never what anyone wants). Treat
2078−/// integers ≥ 2 as pixel lengths; anything with a decimal, an existing unit,
2079−/// or the value `0`/`1` passes through unchanged.
2080−fn css_line_height(value: &str) -> String {
2081− let v = value.trim();
2082− if v == "0" || v == "1" {
2083− return v.to_string();
2084− }
2085− // Plain integer — treat as pixel length. Decimals, units, keywords and
2086− // functions pass through.
2087− if !v.is_empty() && v.chars().all(|c| c.is_ascii_digit()) {
2088− return format!("{}px", v);
2089− }
2090− v.to_string()
2091−}
2092−
20932052/// Format multiple space-separated values, each getting px if needed.
20942053fn css_px_multi(value: &str) -> String {
20952054 value