# Empty class values in hamburger menu

**URL:** https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953
**Category:** Bug
**Created:** [February 5, 2017, 7:29pm UTC](https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953 "2017-02-05T19:29:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [February 5, 2017, 7:29pm UTC](https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953/1 "2017-02-05T19:29:24Z")

</div>

While experimenting with decorateWidget, I discovered that the li tags in the hamburger menu have a class attribute with an empty string as the value.

The hamburger menu widget does add classes to the links within the list items, so CSS is not entirely impossible.

I’m guessing this was an over-sight when the header was revamped. But as no one has squawked about it and they don’t seem to be causing any problems as they are, maybe they could simply be removed and they could be targeted using nth-child (or kin) when need be?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 6, 2017, 3:07pm UTC](https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953/2 "2017-02-06T15:07:24Z")

</div>

@eviltrout your call on what to do here.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 13, 2017, 4:28pm UTC](https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953/3 "2017-02-13T16:28:58Z")

</div>

I think you’re right that the `class` attribute should not be there when there’s no class present. Here’s a fix:

> <https://github.com/discourse/discourse/commit/9d4405d602bd8d13bfc74b13f9d4b9fa96e9ab97>

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [February 13, 2017, 4:29pm UTC](https://meta.discourse.org/t/empty-class-values-in-hamburger-menu/56953/4 "2017-02-13T16:29:00Z")

</div>


