@@ -1700,11 +1700,6 @@ fn attrs_to_css(
1702 // Typography
1702 // Typography
1704− if let Some(v) = val {
1705− push_css(&mut css, "line-height", &css_line_height(v));
1708 "letter-spacing" => {
1703 "letter-spacing" => {
1709 if let Some(v) = val {
1704 if let Some(v) = val {
1710 push_css(&mut css, "letter-spacing", &css_px(v));
1705 push_css(&mut css, "letter-spacing", &css_px(v));
@@ -1987,23 +1982,6 @@ fn attrs_to_css(
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('\'')
1997− || v.starts_with("attr(")
1998− || v.starts_with("counter(")
2000− push_css(&mut css, "content", v);
2002− push_css(&mut css, "content", &format!("\"{}\"", v));
2007 // --- CSS Shorthands ---
1985 // --- CSS Shorthands ---
2008 "line-clamp" => {
1986 "line-clamp" => {
2009 if let Some(v) = val {
1987 if let Some(v) = val {
@@ -2071,25 +2049,6 @@ fn css_px(value: &str) -> String {
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();
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);
2093/// Format multiple space-separated values, each getting px if needed.
2052/// Format multiple space-separated values, each getting px if needed.
2094fn css_px_multi(value: &str) -> String {
2053fn css_px_multi(value: &str) -> String {