@@ -2324,6 +2324,7 @@ fn removed_attribute_hint(name: &str) -> Option<&'static str> {
2324 "backdrop-blur" => Some("use `backdrop-filter blur(...)`"),
2324 "backdrop-blur" => Some("use `backdrop-filter blur(...)`"),
2325 "truncate" => Some("use the `$truncate` bundle"),
2325 "truncate" => Some("use the `$truncate` bundle"),
2326 "critical" => Some("remove it"),
2326 "critical" => Some("remove it"),
2327+ "grid" => Some("use `@grid`, or `display grid`"),
2327 _ => None,
2328 _ => None,
@@ -3038,7 +3039,22 @@ fn parse_attr_list(
3038 let base_key = crate::vocab::base_attribute(attr.key.as_str());
3039 let base_key = crate::vocab::base_attribute(attr.key.as_str());
3039 let is_boolean_html =
3040 let is_boolean_html =
3040 attr.value.is_none() && crate::vocab::BOOLEAN_HTML_ATTRS.contains(&base_key);
3041 attr.value.is_none() && crate::vocab::BOOLEAN_HTML_ATTRS.contains(&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 {
3051+ "attribute '{}' was removed: {} (run `htmlang upgrade`)",
3054+ severity: Severity::Warning,
3041− if is_boolean_html || crate::vocab::is_style_attribute(base_key) {
3057+ } else if is_boolean_html || crate::vocab::is_style_attribute(base_key) {
3042 validate_attr_value(&attr, line_num, ctx);
3058 validate_attr_value(&attr, line_num, ctx);
3043 } else if crate::vocab::HTML_ATTRIBUTES.contains(&base_key)
3059 } else if crate::vocab::HTML_ATTRIBUTES.contains(&base_key)
3044 || base_key.starts_with("aria-")
3060 || base_key.starts_with("aria-")
@@ -3056,17 +3072,6 @@ fn parse_attr_list(
3056 severity: Severity::Warning,
3072 severity: Severity::Warning,
3057 source_line: None,
3073 source_line: None,
3059− } else if let Some(hint) = removed_attribute_hint(base_key) {
3060− ctx.diagnostics.push(Diagnostic {
3064− "attribute '{}' was removed: {} (run `htmlang upgrade`)",
3067− severity: Severity::Warning,
3070 } else {
3075 } else {
3071 let suggestion = suggest_closest(base_key, &crate::vocab::all_attributes());
3076 let suggestion = suggest_closest(base_key, &crate::vocab::all_attributes());
3072 let msg = match suggestion {
3077 let msg = match suggestion {
@@ -3356,7 +3361,6 @@ const CONTAINER_ONLY_ATTRS: &[&str] = &[
3356 "spacing",
3361 "spacing",
3360 "grid-cols",
3364 "grid-cols",
3361 "grid-rows",
3365 "grid-rows",
3362 "container",
3366 "container",