Skip to content

How to change menu background color? #172

Answered by Enlcxx
TicTak21 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, sorry for the delay. There are several ways to do it.

1. Global styling via GlobalVariables or a specific theme

export class CustomGlobalVariables implements PartialThemeVariables {
  menu = {
    root: (__) => lyl `{
      ${__.container} {
        background: blue
      }
    }`,
  };
}

2. Global styling via $global

Adding this style to AppComponent:

...
import { StyleRenderer, lyl, ThemeVariables, ThemeRef } from '@alyle/ui';
import { STYLES as MENU_STYLES } from '@alyle/ui/menu';

const STYLES = (theme: ThemeVariables, ref: ThemeRef) => {
  ref.renderStyleSheet(MENU_STYLES);
  const menu = ref.selectorsOf(MENU_STYLES);
  return {
    $global: lyl `{
      body {
        background…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by TicTak21
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants