Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu Component and color modifiers (e.g. is-primary) #3776

Open
n614cd opened this issue Apr 7, 2024 · 2 comments
Open

Menu Component and color modifiers (e.g. is-primary) #3776

n614cd opened this issue Apr 7, 2024 · 2 comments

Comments

@n614cd
Copy link

n614cd commented Apr 7, 2024

This is about Bulma.

Overview of the problem

This is about the Bulma CSS framework
I'm using Bulma version 1.0.0

My browser is:
Edge 123.0.2420.65
Chrome 123.0.6312.86
Firefox 124.0.1

Description

I am trying to utilize the standard color helper classes "is-primary" "is-info" with sections of a vertical menu. The helpers work correctly with the navbar, but not the vertical menu.

Steps to Reproduce

  1. Copy menu block from: https://bulma.io/documentation/components/menu/
  2. append "is-primary" and other variables to ech menu element. No effect.

Expected behavior

Menu should respect the modifiers, like the navbar has implemented.

Actual behavior

Nothing happened. Checked generated CSS, the modifiers are not present on the menu classes.

@digitigradeit
Copy link

menu never supported colors... in the old docs for 0.9.4 that was easily determined by using the legend on the side of the documentation page, but you can easily change this yourself doing one of the following:

Note there's a concept of a selected item vs an active item but here's a couple examples:

  1. Customize through SCSS:
@use "node_modules/bulma/sass/components/menu" with (
    $menu-item-selected-background-l: cv.getVar("scheme-l"),
    $menu-item-selected-color-l: cv.getVar("scheme-invert-l"),
);

or

@use "node_modules/bulma/sass/components/menu" with (
    $menu-item-selected-background-l: cv.getVar("primary-l"),
    $menu-item-selected-color-l: cv.getVar("primary-invert-l"),
);
  1. or customize with Plain CSS:
.menu-container a.is-selected {
   background-color: hsl(171,100%,41%);
   color: rgb(255,255,255);
}

@n614cd
Copy link
Author

n614cd commented Apr 11, 2024

@digitigradeit

Ah, did not catch that. I will give it a try. Thanks.

Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants