diff --git a/themes/opdavies/templates/menu-local-task.html.twig b/themes/opdavies/templates/menu-local-task.html.twig index 5517db09d..b46ea12ed 100644 --- a/themes/opdavies/templates/menu-local-task.html.twig +++ b/themes/opdavies/templates/menu-local-task.html.twig @@ -16,4 +16,11 @@ * @ingroup themeable */ #} -{{ link|add_class('inline-block p-4 border-b-2 border-transparent rounded-t-lg hover:text-blue-primary hover:border-blue-primary dark:hover:text-gray-300') }} +{% set isActive = element['#active'] %} + +{% set classes = [ + 'inline-block p-4 border-b-2 rounded-t-lg hover:text-blue-primary hover:border-blue-primary dark:hover:text-gray-300', + isActive ? 'text-blue-primary border-blue-primary' : 'border-transparent', +] %} + +{{ link|add_class(classes|join(' ')) }}