Change record status: 
Project: 
Introduced in branch: 
8.x-3.x
Introduced in version: 
8.x-3.8
Description: 

Each of the following templates duplicated the same macro, minus a single line that defined custom classes.

menu.html.twig
menu--main.html.twig
menu--account.html.twig

Now, just menu.html.twig will be the only template to define the menu_links macro.

Any subsequent template that needs to define custom classes will extend from this primary template and simply set its custom classes that should be used, as in the case with menu--account.html.twig:

{% extends "menu.html.twig" %}
{%
  set classes = [
    'menu',
    'menu--' ~ menu_name|clean_class,
    'nav',
    'navbar-nav',
    'navbar-right',
  ]
%}
Impacts: 
Themers