Dropdown axe thématique : surbrillance de l'axe réellement actif + hover
Le premier item du popover était grisé en dur (`:first-of-type`), donc affiché comme actif quel que soit l'axe courant. La classe `is-active` est désormais posée en Twig sur l'axe actif (ou sur « Tous les axes » hors mode taxonomie), et le style suit cette classe. Ajout d'un hover en `background-image` (calque translucide) plutôt qu'en `background-color`, pour un assombrissement identique sur les lignes blanches et grises du zébrage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQLwtNFa1LNaN7QTAbYkZx
This commit is contained in:
+3
-1
@@ -1883,8 +1883,10 @@ footer {
|
|||||||
white-space: normal; }
|
white-space: normal; }
|
||||||
.category-filters .filter-dd .dd-content#filter-axe-popover ul li:nth-of-type(odd) {
|
.category-filters .filter-dd .dd-content#filter-axe-popover ul li:nth-of-type(odd) {
|
||||||
background-color: white; }
|
background-color: white; }
|
||||||
.category-filters .filter-dd .dd-content#filter-axe-popover ul li:first-of-type {
|
.category-filters .filter-dd .dd-content#filter-axe-popover ul li.is-active {
|
||||||
background-color: #cccccc; }
|
background-color: #cccccc; }
|
||||||
|
.category-filters .filter-dd .dd-content#filter-axe-popover ul li:hover {
|
||||||
|
background-image: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)); }
|
||||||
.category-filters .filter-dd .dd-content#filter-axe-popover ul li.dd-axe-group-label {
|
.category-filters .filter-dd .dd-content#filter-axe-popover ul li.dd-axe-group-label {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|||||||
+4
-1
@@ -248,9 +248,12 @@
|
|||||||
&:nth-of-type(odd) {
|
&:nth-of-type(odd) {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
&:first-of-type {
|
&.is-active {
|
||||||
background-color: $less-light-gray;
|
background-color: $less-light-gray;
|
||||||
}
|
}
|
||||||
|
&:hover {
|
||||||
|
background-image: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05));
|
||||||
|
}
|
||||||
&.dd-axe-group-label {
|
&.dd-axe-group-label {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|||||||
@@ -158,10 +158,10 @@
|
|||||||
<div class="dd-content" id="filter-axe-popover" style="display: none;">
|
<div class="dd-content" id="filter-axe-popover" style="display: none;">
|
||||||
<ul>
|
<ul>
|
||||||
{% if not axe_taxonomy_mode %}
|
{% if not axe_taxonomy_mode %}
|
||||||
<li data-axe-id="">{{ current_language == 'en' ? 'All axes' : 'Tous les axes' }}</li>
|
<li data-axe-id=""{% if not active_axe %} class="is-active"{% endif %}>{{ current_language == 'en' ? 'All axes' : 'Tous les axes' }}</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for axe in filter_axes %}
|
{% for axe in filter_axes %}
|
||||||
<li data-axe-id="{{ axe.id }}"{% if not axe_stay_on_page %} data-axe-href="{{ axe.href }}"{% endif %}>{{ axe.name }}</li>
|
<li data-axe-id="{{ axe.id }}"{% if not axe_stay_on_page %} data-axe-href="{{ axe.href }}"{% endif %}{% if active_axe and axe.id == active_axe %} class="is-active"{% endif %}>{{ axe.name }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user