Answer the question
In order to leave comments, you need to log in
Pug how to set default class before specifying others in attributes?
The question arose, how to set the class name for li so that it changes for nested li? Now the class is set for nested lis, but if I write a class separately, then as a result, li gets two classes. And is it possible somehow by analogy to make different classes for the main ul and nested ones?
mixin list(data)
ul
each item in data.items
li(class!=attributes.class)= item.title
if item.sublevel
+list(item)(class="into-nav-menu_item")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question