What would be the proper way to implement a theme-red variant?

Created on 15 February 2023, over 1 year ago

Problem/Motivation

This is a great module. Out of the box, there are 4 themes to chose from for the off-canvas panel:

  • Light (?)
  • Dark (theme-dark)
  • Black (theme-black)
  • White (theme-white)

Just wondering what would be the best way to implement a custom Red theme or Green theme?

Thanks!

πŸ’¬ Support request
Status

Active

Version

4.4

Component

Documentation

Created by

πŸ‡¨πŸ‡¦Canada bisonbleu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @bisonbleu
  • πŸ‡¨πŸ‡¦Canada bisonbleu

    Minor edit on issue title.

  • πŸ‡¨πŸ‡¦Canada bisonbleu

    One ugly way out (a hack) is to set the theme to e.g. Black and then copy the CSS from the mmenu.js library and change it to this:

    .mm-menu_theme-black{
      --mm-color-border:rgba(0,0,0,0.25 );
      --mm-color-button:rgba(0,0,0,0.4 );
      --mm-color-text:rgba(0,0,0,0.75 );
      --mm-color-text-dimmed:rgba(0,0,0,0.4 );
      --mm-color-background:#ff0000;
      --mm-color-background-highlight:rgba(0,0,0,0.2 );
      --mm-color-background-emphasis:rgba(0,0,0,0.15 );
      --mm-shadow:none
    }
Production build 0.69.0 2024