-
Task
-
Resolution: Obsolete
-
Undefined
-
None
-
None
-
False
-
-
False
Problem: all our css applies to the whole of insights, not just us. (Technically, it's a bit better, there are some mitigations, but that's what we should assume.)
So.. using css classes like `active` or even `load-token` is bad, definig custom css for any classes like that is even worse.
Solution: use a `hub-` prefix for all our css.
More specifically, any time we're writing css, it has to be for a `hub-` prefixed class - `.hub-whatever > .pf-something` is fine, but the top class needs to be hub, and NO class should be anything other than hub- or pf- prefixed.
(And any time we're using a css class name, it should to be one of those.)
This was started in https://github.com/ansible/ansible-hub-ui/pull/1382, related to RHCLOUD-16591,
more details in https://github.com/ansible/ansible-hub-ui/pull/1657, including a linter rule to detect these.
(Also related to AAH-1546)
—
All we need is the hub- prefix, but while doing this, it would make sense to do a bit more:
- ensure every component adding css has an associated css class that wraps the whole component ... as in, everything rendered by the CardListSwitcher component should be in an element using a `hub-c-card-list-switcher` class.
- deduplicate css - if 3 files add the same style for their screen, maybe that should live in our global css (definitely toolbar css)
- find out which css is only needed for standalone (nav, body, root) and move somewhere not included by insights
- remove dead css