This repository was archived by the owner on May 9, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generally, the nicer the CSS, the less 'standard' css classes we'll use. So ideally we'll like to be able to remove all those default classes from things. D8 goes a long way toward this (choose the classy base theme if you want the classes) but in D7 we're kind of on our own.
So we normally would remove them in a preprocess. Oftentimes that means we end up with something like this:
… before then adding just the nice custom classes we want. Whilst this is tempting because it's quick and easy to get a 'clean slate', it's a pretty nuclear solution, and totally breaks certain things (such as contextual links regions).
A nicer way would be to methodically remove all the uber-generic crufty classes we don't want eg. for paragraphs:
… but as you can see that's a long way from quick and easy.
So, the suggestion is we have a global opt-in setting for cm_tools that just does this for common theme hooks (preprocesses away the stock classes). We'll need to module_implements_alter each of our preprocess functions to be late (specifically, later than whatever module defines the hook).