Skip to content

Commit a1482ac

Browse files
authored
Style Update Drupal Menu Task Links (#923)
* task: update drupal task links * task: run format
1 parent 0498719 commit a1482ac

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

apps/drupal-default/particle_theme/templates/navigation/menu-local-task.html.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616
#}
1717

18-
{% set link_classes = ['nav-link', is_active ? 'active']|join(' ') %}
18+
{% set link_classes = ['task-link', is_active ? 'task-link--active' : 'task-link--inactive']|join(' ') %}
1919

2020
{# Merge attributes/classes into link #}
21-
<li {{ attributes.addClass('nav-item') }}>
21+
<li {{ attributes.addClass('mr-3') }}>
2222
{{
2323
link|merge({
2424
'#options': {

apps/drupal-default/particle_theme/templates/navigation/menu-local-tasks.html.twig

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,21 @@
1111
* themed in menu-local-task.html.twig.
1212
*/
1313
#}
14-
15-
{% set nav_classes = ['nav', 'nav-tabs', 'mb-2']|join(' ') %}
14+
{% set list_classes = ['flex']|join(' ') %}
1615

1716
{% if primary %}
1817
<h2 class="visually-hidden">
1918
{{ 'Primary tabs'|t }}
2019
</h2>
21-
<ul class="{{ nav_classes }}">
20+
<ul class="{{ list_classes }}">
2221
{{ primary }}
2322
</ul>
2423
{% endif %}
25-
2624
{% if secondary %}
2725
<h2 class="visually-hidden">
2826
{{ 'Secondary tabs'|t }}
2927
</h2>
30-
<ul class="{{ nav_classes }}">
28+
<ul class="{{ list_classes }}">
3129
{{ secondary }}
3230
</ul>
3331
{% endif %}

source/default/_patterns/00-protons/tailwind.tokens.css

+21
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,24 @@ tr {
190190
@apply pb-16;
191191
}
192192
}
193+
194+
/**
195+
* Drupal Theme Overrides
196+
*/
197+
198+
/* Menu-Local-Task Links */
199+
.task-link {
200+
@apply inline-block border py-1 px-3;
201+
}
202+
203+
.task-link--active {
204+
@apply border-blue-500 bg-blue-500 text-white;
205+
}
206+
207+
.task-link--inactive {
208+
@apply border-white text-blue-500;
209+
}
210+
211+
.task-link--inactive:hover {
212+
@apply border-gray-200 bg-gray-200;
213+
}

0 commit comments

Comments
 (0)