#2881212: Formatting guidelines toggle script relies on Classy selectors introduced a change to formatting guidelines markup. This visually breaks Bootstrap styles. Add classes back in Bootstrap to fix the visual regression.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lauriii created an issue. See original summary.

markhalliwell’s picture

Issue tags: +Needs backport to 8.x-3.x

Classes can be be added back in TextFormat::processElement.

Eli-T’s picture

Status: Active » Needs review
FileSize
1.32 KB

Classes re-added as suggested in #2.

markhalliwell’s picture

Status: Needs review » Needs work
+++ b/src/Plugin/Process/TextFormat.php
@@ -26,21 +26,26 @@ class TextFormat extends ProcessBase implements ProcessInterface {
+      $element->format->addClass('form-inline')
+        ->addClass('filter-wrapper');
...
         ->addClass('input-sm')
+        ->addClass('filter-list')

The addClass method is very versatile and can help reduce duplication and noise of having to specify the method each time, like is done here. Instead, just call the method once with an array of classes, e.g.
$element->format->addClass(['form-inline', 'filter-wrapper']);

Eli-T’s picture

Status: Needs work » Needs review
FileSize
1.31 KB
819 bytes

Thanks @markcarver! New patch as suggested in #4.

  • markcarver committed 1f40d9e on 8.x-4.x authored by Eli-T
    Issue #3061715 by Eli-T, lauriii: Update formatting guidelines markup...

  • markcarver committed 51409d4 on 8.x-3.x authored by Eli-T
    Issue #3061715 by Eli-T, lauriii: Update formatting guidelines markup...
markhalliwell’s picture

Status: Needs review » Fixed
Issue tags: -Needs backport to 8.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.