Follow-up to #2539860: Add a class to field that contain user-generated formatted text
Problem/Motivation
It's common to provide styling for base elements, elements that don't have classes. This styling is used in situations where a user can enter formatted HTML text. This can often introduce conflicts with UI components, if they are using the elements that have styling applied.
Some themes get around this by prefixing the base selectors with a wrapper class a indicates they are free text, not a UI component.
Bartik has an attempt to do this:
.region-content ul,
.region-content ol {
margin: 1em 0;
padding: 0 0 0.25em 15px; /* LTR */
}
The logic of this selector is flawed because anything can go inside the content region, not just free text. Any UI component placed in .region-content that includes ul could inherit this styling by mistake.
Proposed resolution
In #2539860: Add a class to field that contain user-generated formatted text we added a class called 'text-formatted' that only applies to fields that include free text. This reduces the scope of the selector.
Remaining tasks
Patch
Test for visual regressions
User interface changes
None
API changes
None
Data model changes
None
Beta phase evaluation
Issue category | Task because it's improves code quality |
---|---|
Issue priority | Not critical because it's code quality |
Unfrozen changes | Unfrozen because it only changes CSS |