Views CSS class is changed when underscores and dashes are mixed

Created on 3 October 2023, about 1 year ago
Updated 12 December 2023, 11 months ago

Problem/Motivation

Views is munging valid classes when it should not. This seems to be based on having a dash or multiple dashes as part of the class name in between two other parts of the same class name that use an underscore or underscores.

This breaks styles associated with that classname from applying.

Steps to reproduce

Edit a view.

Add a CSS class (under "Other") with a structure like:

grid__item-flow_middle

Save the view and inspect the source of the resulting page:

Instead of outputting that class, the View will output two of its own variations of that class:

grid--item-flow-middle grid__item-flow-middle

Proposed resolution

Stop whatever weird, rogue CSS grammar cop that is causing the valid class name with mixed underscores and dashes to be rewritten as two different versions with underscores and dashes un-mixed.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

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

Comments & Activities

Production build 0.71.5 2024