".highlight" class is too broad and not BEM standards.

Created on 9 July 2021, about 3 years ago
Updated 6 September 2024, 10 days ago

Problem/Motivation

The ".highlight" class being added by better_exposed_filters.js for checkboxes is too broad for the name. A lot of sites like our site has. "highlight" class used for highlighted elements. For example https://future-students.uq.edu.au

As well as it's not following the BEM standards.

Since it's being added by JS it's hard to manipulate via Drupal theming layer.

The class name should be ".bef-checkboxes--highlight". And for other elements .bef----highlight.

Steps to reproduce

- Add a highlight class in your theme CSS.
- Create a view with BEF
- When it adds the class it uses the styles from theme CSS which might not be what you want.

Proposed resolution

Short Term.

In better_exposed_filters.js change the class name to ".bef-checkboxes--highlight"

Long Term

Make it broader and add class name via Drupal theme layer so can be modified by other modules or themes.

Remaining tasks

- Long Term Solution

User interface changes

- N/A

API changes

N/A

Data model changes

N/A

📌 Task
Status

Fixed

Version

5.0

Component

Code

Created by

🇦🇺Australia amjad1233 Brisbane

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024