-
Notifications
You must be signed in to change notification settings - Fork 203
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
docs: update MenuBar docs to use CSS class #3048
Conversation
vaadin-menu-bar-button[theme~="custom-theme"], | ||
vaadin-menu-bar-item[theme~="custom-theme"] { | ||
vaadin-menu-bar-button.custom-classname, | ||
vaadin-menu-bar-item.custom-classname { | ||
text-transform: uppercase; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could change the styling to something people actually might notice, like background color?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to use Lumo utility classes and removed this file.
An individual menu item can be styled using custom theme variants. A custom variant can be created by adding a custom theme name (e.g., `custom-theme`) to an item, and then adding CSS for styling all items using that theme name. | ||
|
||
The following example shows how to add a custom theme variant named `custom-theme` to individual menu bar buttons and items, and how to style that variant with CSS: | ||
Individual menu items can be styled by [since:com.vaadin:[email protected]]##applying custom classnames to them##, and writing CSS style blocks targeting those classnames. Note that root-level menu items in the Menu Bar are wrapped inside `vaadin-menu-bar-button` elements which inherit the classnames from the items inside them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently we've decided to go with "class names" instead of "classnames" in docs, so let's change all occurrences to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Update MenuBar documentation to use CSS classes instead of the theme API
Fixes #3030