@@ -2324,6 +2324,7 @@ fn removed_attribute_hint(name: &str) -> Option<&'static str> {
23242324 "backdrop-blur" => Some("use `backdrop-filter blur(...)`"),
23252325 "truncate" => Some("use the `$truncate` bundle"),
23262326 "critical" => Some("remove it"),
2327+ "grid" => Some("use `@grid`, or `display grid`"),
23272328 _ => None,
23282329 }
23292330}
@@ -3038,7 +3039,22 @@ fn parse_attr_list(
30383039 let base_key = crate::vocab::base_attribute(attr.key.as_str());
30393040 let is_boolean_html =
30403041 attr.value.is_none() && crate::vocab::BOOLEAN_HTML_ATTRS.contains(&base_key);
3041− if is_boolean_html || crate::vocab::is_style_attribute(base_key) {
3042+ // A removed attribute that shares its name with a CSS property
3043+ // (bare `grid`) still gets its hint.
3044+ let removed = removed_attribute_hint(base_key)
3045+ .filter(|_| attr.value.is_none() || !crate::vocab::is_css_property(base_key));
3046+ if let Some(hint) = removed {
3047+ ctx.diagnostics.push(Diagnostic {
3048+ line: line_num,
3049+ column: None,
3050+ message: format!(
3051+ "attribute '{}' was removed: {} (run `htmlang upgrade`)",
3052+ base_key, hint
3053+ ),
3054+ severity: Severity::Warning,
3055+ source_line: None,
3056+ });
3057+ } else if is_boolean_html || crate::vocab::is_style_attribute(base_key) {
30423058 validate_attr_value(&attr, line_num, ctx);
30433059 } else if crate::vocab::HTML_ATTRIBUTES.contains(&base_key)
30443060 || base_key.starts_with("aria-")
@@ -3056,17 +3072,6 @@ fn parse_attr_list(
30563072 severity: Severity::Warning,
30573073 source_line: None,
30583074 });
3059− } else if let Some(hint) = removed_attribute_hint(base_key) {
3060− ctx.diagnostics.push(Diagnostic {
3061− line: line_num,
3062− column: None,
3063− message: format!(
3064− "attribute '{}' was removed: {} (run `htmlang upgrade`)",
3065− base_key, hint
3066− ),
3067− severity: Severity::Warning,
3068− source_line: None,
3069− });
30703075 } else {
30713076 let suggestion = suggest_closest(base_key, &crate::vocab::all_attributes());
30723077 let msg = match suggestion {
@@ -3356,7 +3361,6 @@ const CONTAINER_ONLY_ATTRS: &[&str] = &[
33563361 "spacing",
33573362 "gap",
33583363 "wrap",
3359− "grid",
33603364 "grid-cols",
33613365 "grid-rows",
33623366 "container",