Page MenuHomePhabricator

Remove all id CSS selectors in MobileFrontend
Open, NormalPublic

Description

There is no good reason for using id's in MobileFrontend. They cause headaches when trying to implement new features due to competing CSS rules and they point to an architecture that needs more thought. For example the #section_0 heading.

We should aim to remove any id selectors, leaving only those that are needed to override local templates or styles in MediaWiki core.

The use of IDs has caused pain in the implementation of T139794

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 13 2016, 2:57 AM
bmansurov added a subscriber: bmansurov.EditedJul 13 2016, 5:17 PM

Don't we want to use IDs to denote uniqueness of some elements?

Also we need to keep IDs of sections as we want to link to them. There are possibly other valid cases for not removing IDs. We should investigate more.

Sure. We can keep IDs. IDs are good.
The thing that is not so good imo is using them for styling:
https://github.com/CSSLint/csslint/wiki/disallow-ids-in-selectors

Jdlrobson updated the task description. (Show Details)Jul 18 2016, 10:53 PM
jhobs triaged this task as Normal priority.Jul 21 2016, 8:26 PM
jhobs awarded a token.
jhobs moved this task from Incoming to Triaged but Future on the Readers-Web-Backlog board.
Volker_E added a subscriber: Volker_E.

@Jdlrobson, can this task be done in Google-Code-In-2016? If yes then I will wish that you make a list of IDs that should be removed and how this can be done in order not to cause any regressions. Else we can just leave this a regular task for some interested person to work on. What do you think?

@D3r1ck01 probably not. It's going to require someone who is very familiar with the MobileFrontend extension and its architecture.

@D3r1ck01 probably not. It's going to require someone who is very familiar with the MobileFrontend extension and its architecture.

Ok I see. That sounds ok then. Thanks for the response.

Jdlrobson added a project: Epic.
Jdlrobson moved this task from Backlog to Later on the Readers-Web-Backlog (Tracking) board.
Izno moved this task from Backlog to Change CSS Hook on the CSS board.Sep 7 2018, 4:52 PM