Consider updating Classy's search result markup

Created on 25 May 2015, over 9 years ago
Updated 27 May 2024, 6 months ago

Follow-up to #2489394: Refactor the Search module markup to be inline with our standards.

Problem/Motivation

The parent issue updated the search result markup (search-result.html.twig) in Classy to follow BEM standards:

+<h3{{ title_attributes.addClass('search-result__title') }}>
   <a href="{{ url }}">{{ title }}</a>
 </h3>
 {{ title_suffix }}
<div class="search-result__snippet-info">
   {% if snippet %}
    <p{{ content_attributes.addClass('search-result__snippet') }}>{{ snippet }}</p>
   {% endif %}
   {% if info %}
    <p class="search-result__info">{{ info }}</p>
   {% endif %}
 </div>

The class names were not great before, and even with the BEMmification could be improved and made less ambiguous.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->

Proposed resolution

Discuss some alternative class names to replace/partially replace these:

search-result__snippet-info
search-result__snippet
search-result__info

Remaining tasks

Discuss
Patch
Patch review
Visual regression tests

User interface changes

n/a

API changes

n/a

📌 Task
Status

Needs review

Version

11.0 🔥

Component
Search 

Last updated about 7 hours ago

Created by

🇨🇦Canada star-szr

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

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