==== Background information
The apps currently have complex checks for [[ https://github.com/wikimedia/wikimedia-page-library/blob/master/src/transform/ThemeTransform.js#L83-L98 | very specific parts of templates ]] that need to be excluded from theming. This is not a tenable long term solution. These templates will likely change and new templates with the same problem will be added in the future. The existing check is already the most expensive part of generating the page and will only get more expensive as more exclusions are added. This expensive check was one of the main causes of T229286.
==== What
Have a CSS class that template editors can add to exclude certain items from theming. I’m proposing `notheme` as it matches the existing `nomobile`. The existing `pagelib_theme_div_do_not_apply_baseline` in the page library can be renamed to `notheme` to serve this purpose.
==== How
- [[ https://github.com/wikimedia/wikimedia-page-library/pull/255 | Update the page library ]]
- [DONE] [[ https://gerrit.wikimedia.org/r/c/mediawiki/services/mobileapps/+/544854 | Remove the expensive check from the mobileapps service ]]
- Comment on the talk page of the templates we were manually excluding encouraging them to add the `notheme` class to the appropriate elements. Provide a link to this ticket, a screenshot of the issue, and a link to a copy of the template in userspace with the changes made already.
==== Open questions
Are there any better alternative solutions? Open to other suggestions