Re: [csswg-drafts] [css-fonts-4] `<family-name>` syntax disallows CSS-wide keywords entirely instead of just as whole value (#13692)

Today I was working on a personal website and I was quite astonished to find out ``inherit`` isn't accepted at the end of a list. Personally, I think it would be best to give this the behavior that's most intuitive. I doubt there's any font out there deliberately called "inherit", just to mess with CSS. Should anyone be devious enough do so, it might still be possible to use such a font with a font at-rule.

I tried this in FF, both ``inherit`` and ``"inherit"`` aren't accepted in lists, but ``inherit`` on its own is accepted and does what it says on the tin. ``"inherit"`` is interpreted as an actual font.

Investigating this further, inherit was first specified in CSS2. [Font-family](https://www.w3.org/TR/CSS2/fonts.html#font-family-prop) takes either a list of fonts or inherit up until the [CSS Fonts Module 3](https://www.w3.org/TR/css-fonts-3/#font-family-prop) spec, where it appears inherit was dropped from this property entirely. The current draft still does this, hence this issue exists.

It would be nice if it becomes possible to specify for a given element: "Use this or that font, but if you don't have those, blend in with the rest". Inherit at the end of a list would be perfect for this. I wonder if anyone has suggested this before and if so, why the heck it wasn't added.

-- 
GitHub Notification of comment by PurpleVsGreen
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13692#issuecomment-4136375188 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 26 March 2026 16:23:30 UTC