Since last week, CSS classes like toc and toccolours apparently are no longer styled in the new Vector skin. At least in German-language WP, the toccolours class is used frequently for styling infoboxes, but also for other tables. Is there any good reason to drop the styles of this class in Vector-2022? I just fixed the general infobox template on dewiki (diff), but it is close to impossible to properly fix all the different infoboxes without altering their styles also in the other skins. I also had to fix templates relying on the toc class, but that one is used less frequently.
Description
Related Objects
- Mentioned In
- T395598: Table of contents on Special:CiteThisPage broken on Vector 2022, mobile
T371446: Inconsistent invert on desktop vs. mobile
T311529: New Vector TOC is not shown when viewing a diff with preview - Mentioned Here
- T311529: New Vector TOC is not shown when viewing a diff with preview
T239914: Class "toccolours" not styled
T309500: Timeless over styles toccolours class
Event Timeline
s there any good reason to drop the styles of this class in Vector-2022?
Vector 2022 table of contents does not share any styles with the Vector table of contents, so if we were to include them we'd be loading about 2.14kb of CSS for no real purpose. I think it would make sense to use TemplateStyles here and include the stylesheet on all templates using it. I realize this is a lot of work, so you may want to include these styles in Vector2022.css for the time being.
Yeah, I understand that. Has it been checked whether these classes have been used outside of the usual TOC? I’m wondering if this is a mere dewiki thing. For now I’ll add the styles to the Skin CSS.
This task is awfully similar to T239914: Class "toccolours" not styled, which was filed for Timeless originally (and resolved for that skin, see also T309500). As I linked in that task, en.wp has some 17k direct uses in main space, and a quick check in template and module space is another 900 uses. No particularly deleterious effect to remove the styles, but OTOH it's going to be a surprise without some discussion.
I'd like to get rid of those uses personally since .wikitable is broadly better for ad hoc table uses while needing styles for <div>s and others should probably be restricted to templates, but that's a lot of pages that are definitely not my priority.
.toc is used less frequently, but also in several of the templates that emulate a table of contents (see recent discussion on en.wp about the Vector22 TOC).
@Jdlrobson While T311529 hasn’t been fixed, CSS classes also missed to diff pages, not only templates.
I would say it would be better to drop the support for .toccolours everywhere given that it is a very hacky class that doesn’t have actual documented purpose and the projects that would want it back have an easy time to add it to Common.css. Currently it is a bit of ‘the worst of both worlds’ because it is undeployed from Vector 2022 but not from any other skin, so both the deprecation work cannot commence fully and/or the editors that edit from other skins do not see the effects their markup has in Vector 2022.
