Menu icon Foundation
Hamburger Background Color?

Hello - using the Hamburger mixin, and I notice that it doesn't have a way to adjust its background color, so if I want purple bars on a white background, all of which would sit on a black background, I can't do that currently, correct? And if I wanted to do something like this, how would I? Would I make a custom mixin based on the existing one, to allow for a background variable? Or is there something else?

 

Thanks!

hamburger

Hello - using the Hamburger mixin, and I notice that it doesn't have a way to adjust its background color, so if I want purple bars on a white background, all of which would sit on a black background, I can't do that currently, correct? And if I wanted to do something like this, how would I? Would I make a custom mixin based on the existing one, to allow for a background variable? Or is there something else?

 

Thanks!

Rafi Benkual about 1 year ago

Might be easier to wrap the hamburger button in a container that has padding and a background. There is a similar example here: https://foundation.zurb.com/building-blocks/blocks/topbar-responsive.html