Closed (fixed)
Project:
Seven
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
14 Sep 2025 at 20:30 UTC
Updated:
10 Oct 2025 at 09:39 UTC
Jump to comment: Most recent
The css/base/elements.css file contains the following comment.
/**
* Unfortunately, text-decoration for details summary is not supported on all
* browsers. So we add a span (which can handle text-decoration) in Seven's
* templates/details.html.twig. In case there are other details templates that
* don't have the span, we provide text-decoration in the parent selector.
* This provides maximum compatibility and coverage with minimal disruption.
*/
It is no longer true that a <span> is added in the templates/details.html.twig file. In fact, the currently used markup is the following one.
<details{{ attributes.addClass('seven-details') }}>
{%- if title -%}
{%
set summary_classes = [
'seven-details__summary',
required ? 'js-form-required',
required ? 'form-required',
]
%}
<summary{{ summary_attributes.addClass(summary_classes) }}>
{{- title -}}
</summary>
{%- endif -%}
<div class="seven-details__wrapper details-wrapper">
{% if errors %}
<div class="form-item form-item--error-message">
<strong>{{ errors }}</strong>
</div>
{% endif %}
{%- if description -%}
<div class="seven-details__description">{{ description }}</div>
{%- endif -%}
{%- if children -%}
{{ children }}
{%- endif -%}
{%- if value -%}
{{ value }}
{%- endif -%}
</div>
</details>
The content of the <summary> tag is the following one.
<summary{{ summary_attributes.addClass(summary_classes) }}>
{{- title -}}
</summary>
Remove the following lines from the css/base/elements.css file.
/**
* Unfortunately, text-decoration for details summary is not supported on all
* browsers. So we add a span (which can handle text-decoration) in Seven's
* templates/details.html.twig. In case there are other details templates that
* don't have the span, we provide text-decoration in the parent selector.
* This provides maximum compatibility and coverage with minimal disruption.
*/
details summary:focus span,
details summary:hover span {
text-decoration: underline;
}
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #4
avpadernoComment #5
avpadernoI checked on the live preview; on the /admin/modules page, for example, the Displays announcements from the Drupal community. text is still shown underlined when it is hovered or when it is the selected item.
Are there other pages to check?
Comment #7
avpadernoComment #10
avpadernoComment #12
avpaderno