Skip to content

Commit

Permalink
Fix: Add new menu header color variables (fixes adaptlearning#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
swashbuck authored May 23, 2023
1 parent cb0d55a commit 23f4ac3
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
5 changes: 5 additions & 0 deletions less/_defaults/_colors.less
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@

// Menu
// --------------------------------------------------
@menu-header-background-color: transparent;
@menu-header-title-color: @heading-color;
@menu-header-body-color: @font-color;
@menu-header-instruction-color: @font-color;

@menu-item: @white;
@menu-item-inverted: @font-color;
@menu-item-border-color: @item-color;
Expand Down
5 changes: 4 additions & 1 deletion less/plugins/adapt-contrib-boxmenu/boxMenu.less
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@
&__header-inner {
position: relative;
.l-container-padding(@menu-header-padding-ver, @menu-header-padding-hoz);
background-color: @menu-header-background-color;
}

&__title {
margin-bottom: @menu-title-margin;
.menu-title;
color: @heading-color;
color: @menu-header-title-color;
}

&__subtitle {
Expand All @@ -52,11 +53,13 @@
&__body {
margin-bottom: @menu-body-margin;
.menu-body;
color: @menu-header-body-color;
}

&__instruction {
margin-bottom: @menu-instruction-margin;
.menu-instruction;
color: @menu-header-instruction-color;
}

&__body a,
Expand Down
24 changes: 24 additions & 0 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,30 @@
"required": false,
"title": "Menu",
"properties": {
"menu-header-background-color": {
"title": "Menu header background colour",
"type": "string",
"inputType": "ColourPicker",
"default": ""
},
"menu-header-title-color": {
"title": "Menu header title colour",
"type": "string",
"inputType": "ColourPicker",
"default": ""
},
"menu-header-body-color": {
"title": "Menu header body colour",
"type": "string",
"inputType": "ColourPicker",
"default": ""
},
"menu-header-instruction-color": {
"title": "Menu header instruction colour",
"type": "string",
"inputType": "ColourPicker",
"default": ""
},
"menu-item": {
"title": "Menu item colour",
"type": "string",
Expand Down
24 changes: 24 additions & 0 deletions schema/theme.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,30 @@
"title": "Menu",
"default": {},
"properties": {
"menu-header-background-color": {
"type": "string",
"title": "Menu header background colour",
"default": "",
"_backboneForms": "ColourPicker"
},
"menu-header-title-color": {
"type": "string",
"title": "Menu header title colour",
"default": "",
"_backboneForms": "ColourPicker"
},
"menu-header-body-color": {
"type": "string",
"title": "Menu header body colour",
"default": "",
"_backboneForms": "ColourPicker"
},
"menu-header-instruction-color": {
"type": "string",
"title": "Menu header instruction colour",
"default": "",
"_backboneForms": "ColourPicker"
},
"menu-item": {
"type": "string",
"title": "Menu item colour",
Expand Down

0 comments on commit 23f4ac3

Please sign in to comment.