Namespace dropdown menu CSS

This commit is contained in:
Nick O'Leary
2019-05-07 14:46:44 +01:00
parent 67f8ec7f87
commit 3f1c4b4117
11 changed files with 264 additions and 334 deletions

View File

@@ -37,6 +37,19 @@ body {
overflow:hidden;
}
#red-ui-palette-shade, #red-ui-editor-shade, #red-ui-header-shade, #red-ui-sidebar-shade {
@include shade;
z-index: 2;
}
#red-ui-sidebar-shade {
left: -8px;
top: -1px;
bottom: -1px;
}
#red-ui-full-shade {
@include shade;
z-index: 15;
}
a {
color: #0088cc;

View File

@@ -83,3 +83,13 @@ $diff-state-unchanged: #bbb;
$diff-state-conflicted: purple;
$diff-state-moved: #3f81b3;
$diff-state-conflict: #9b45ce;
$menuBackground: #f3f3f3;
$menuDivider: #e5e5e5;
$menuColor: #444;
$menuActiveColor: #ffffff;
$menuActiveBackground: #777;
$menuDisabledColor: #999;
$menuHoverColor: #ffffff;
$menuHoverBackground: #999;
$menuCaret: #e0e0e0;

View File

@@ -14,231 +14,157 @@
* limitations under the License.
**/
.dropdown-menu {
.red-ui-menu-dropdown {
position: absolute;
top: 100%;
width: 200px;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
margin-left: 0px !important;
padding: 5px 0;
list-style: none;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
background: $menuBackground;
border: 1px solid $secondary-border-color;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
&.pull-right {
right: 0;
left: auto;
}
.divider {
height: 1px;
margin: 9px 1px;
overflow: hidden;
background-color: $menuDivider;
}
& > li > a {
display: block;
padding: 3px 0 3px 32px;
clear: both;
font-weight: normal;
line-height: 20px;
color: $menuColor;
white-space: normal !important;
}
& > .active > a,
& > .active > a:hover,
& > .active > a:focus {
color: $menuActiveColor;
text-decoration: none;
background-color: $menuActiveBackground;
outline: 0;
}
& > .disabled > a,
& > .disabled > a:hover,
& > .disabled > a:focus {
color: $menuDisabledColor;
}
& > .disabled > a:hover,
& > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
background-image: none;
}
a {
.fa {
width: 20px;
margin-left: -25px;
margin-top: 3px;
text-align: center;
}
.fa-check-square {
display: none;
}
.fa-square {
display: inline-block;
}
&.active {
.fa-check-square {
display: inline-block;
}
.fa-square {
display: none;
}
}
}
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.pull-right > .dropdown-menu {
.pull-right > .red-ui-menu-dropdown {
right: 0;
left: auto;
}
.dropdown-menu .divider {
*width: 100%;
height: 1px;
margin: 9px 1px;
*margin: -5px 0 5px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid #ffffff;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 20px;
color: #333333;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
color: #ffffff;
.red-ui-menu-dropdown > li > a:hover,
.red-ui-menu-dropdown > li > a:focus,
.red-ui-menu-dropdown-submenu:hover > a,
.red-ui-menu-dropdown-submenu:focus > a {
color: $menuHoverColor;
text-decoration: none;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
background-color: $menuHoverBackground;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
outline: 0;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #999999;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}
.dropdown-submenu {
position: relative;
}
.dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.dropdown-submenu > a:after {
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
border-color: transparent;
border-left-color: #cccccc;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
}
.dropdown-submenu:hover > a:after {
border-left-color: #ffffff;
}
.dropdown-submenu.pull-left {
float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus, .dropdown-submenu:hover>a, .dropdown-submenu:focus>a {
background: #999;
}
.dropdown-menu {
background: #f3f3f3;
border-color: $secondary-border-color;
&>li>a {
color: #444;
.red-ui-menu-dropdown-submenu {
position: relative;
& > .red-ui-menu-dropdown {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
}
&:hover > .red-ui-menu-dropdown {
display: block;
}
& > a:after {
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
border-color: transparent;
border-left-color: $menuCaret;
border-style: solid;
border-width: 5px 0 5px 5px;
content: " ";
}
&.pull-left {
float: none;
& > .red-ui-menu-dropdown {
left: -100%;
margin-left: 10px;
}
}
}
.dropdown-menu * .fa-check-square {
display: none;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-check-square {
display: inline-block;
}
.dropdown-menu * .fa-square {
display: inline-block;
color: #e0e0e0;
margin-left: -25px;
margin-top: 3px;
}
.dropdown-menu * a.active > .fa-square {
.red-ui-menu-dropdown-submenu>a:after {
display: none;
}
/** Fix for unreachable dropdown menu **/
.dropdown-menu {
border-radius: 0;
width: 200px !important;
margin-left: 0px !important;
}
.dropdown-menu > li > a > i {
width: 10px;
text-align: center;
margin-left: -8px;
}
.dropdown-menu > li > a {
padding-left: 38px ;
text-indent: -8px ;
white-space: normal !important;
}
.dropdown-submenu>a:after {
display: none;
}
.dropdown-submenu>a:before {
.red-ui-menu-dropdown-submenu>a:before {
display: block;
float: left;
width: 0;
height: 0;
margin-top: 5px;
margin-left: -30px;
/* Caret Arrow */
border-color: transparent;
border-right-color: #e0e0e0;
border-right-color: $menuCaret;
border-style: solid;
border-width: 5px 5px 5px 0;
content: " ";
}
.dropdown-submenu.disabled > a:before {
.red-ui-menu-dropdown-submenu.disabled > a:before {
border-right-color: #444;
}
.dropdown-submenu.pull-left>.dropdown-menu {
border-radius: 0;
}

View File

@@ -154,21 +154,8 @@
background: $background-color;
color: $workspace-button-color;
}
#red-ui-palette-shade, #red-ui-editor-shade, #red-ui-header-shade, #red-ui-sidebar-shade {
@include shade;
z-index: 2;
}
#red-ui-sidebar-shade {
left: -8px;
top: -1px;
bottom: -1px;
}
#red-ui-full-shade {
@include shade;
z-index: 15;
}
.dialog-form,#dialog-form, #node-config-dialog-edit-form {
.dialog-form, #dialog-form, #node-config-dialog-edit-form {
height: 100%;
}

View File

@@ -764,8 +764,8 @@ select:focus:invalid:focus {
.input-prepend select,
.input-append .uneditable-input,
.input-prepend .uneditable-input,
.input-append .dropdown-menu,
.input-prepend .dropdown-menu,
.input-append .red-ui-menu-dropdown,
.input-prepend .red-ui-menu-dropdown,
.input-append .popover,
.input-prepend .popover {
font-size: 14px;

View File

@@ -24,6 +24,7 @@ $deployDisabledButton: #444;
$deployDisabledButtonHover: #555;
$deployDisabledButtonActive: #444;
$headerMenuColor: #C7C7C7;
$headerMenuBackground: #121212;
$headerMenuItemHover: #323232;
$headerMenuItemDivider: #464646;
@@ -42,7 +43,7 @@ $headerMenuItemDivider: #464646;
background: #000;
box-sizing: border-box;
padding: 0px 0px 0px 20px;
color: #C7C7C7;
color: $headerMenuColor;
font-size: 14px;
span.red-ui-header-logo {
@@ -95,7 +96,7 @@ $headerMenuItemDivider: #464646;
font-size: 20px;
padding: 0px 12px;
text-decoration: none;
color: #C7C7C7;
color: $headerMenuColor;
margin: auto 5px;
vertical-align: middle;
border-left: 2px solid #000;
@@ -129,7 +130,7 @@ $headerMenuItemDivider: #464646;
}
}
.deploy-button {
.red-ui-deploy-button {
background: $deployButton;
color: #eee !important;
@@ -143,7 +144,7 @@ $headerMenuItemDivider: #464646;
}
}
.deploy-button-spinner {
.red-ui-deploy-button-spinner {
position: absolute;
left: 0;
top: 0;
@@ -157,35 +158,35 @@ $headerMenuItemDivider: #464646;
}
}
#btn-deploy {
#red-ui-header-button-deploy {
padding: 4px 12px;
&.disabled {
cursor: default;
background: $deployDisabledButton;
color: #999 !important;
.deploy-button-content>img {
.red-ui-deploy-button-content>img {
opacity: 0.3;
}
&+ #btn-deploy-options {
&+ #red-ui-header-button-deploy-options {
background: $deployDisabledButton;
color: #ddd;
}
&+ #btn-deploy-options:hover {
&+ #red-ui-header-button-deploy-options:hover {
background: $deployDisabledButtonHover;
}
&+ #btn-deploy-options:active {
&+ #red-ui-header-button-deploy-options:active {
background: $deployDisabledButton;
}
}
.deploy-button-content>img {
.red-ui-deploy-button-content>img {
margin-right: 8px;
}
}
.deploy-button-group.open {
#btn-deploy-options {
.red-ui-deploy-button-group.open {
#red-ui-header-button-deploy-options {
background: $activeButton !important;
}
}
@@ -196,88 +197,81 @@ $headerMenuItemDivider: #464646;
}
ul.dropdown-menu {
ul.red-ui-menu-dropdown {
background: $headerMenuBackground;
border: 1px solid rgba(0,0,0,0.2);
width: 250px !important;
margin-top: 0;
}
li a {
color: $headerMenuColor;
padding: 3px 40px;
img {
margin-right: 10px;
padding: 4px;
border: 3px solid rgba(0,0,0,0);
}
ul.dropdown-menu li a {
color: #C7C7C7;
padding: 3px 40px;
}
&.active img {
border: 3px solid #777677;
}
ul.dropdown-menu li a img {
margin-right: 10px;
padding: 4px;
border: 3px solid rgba(0,0,0,0);
}
ul.dropdown-menu li a.active img {
border: 3px solid #777677;
}
ul.dropdown-menu li a span.menu-label-container {
width: 180px;
vertical-align: top;
display: inline-block;
text-indent: 0px;
}
ul.dropdown-menu li a span.menu-label {
font-size: 14px;
display: inline-block;
text-indent: 0px;
}
ul.dropdown-menu li a span.menu-sublabel {
color: #aeaeae;
font-size: 13px;
display: inline-block;
text-indent: 0px;
}
ul.dropdown-menu > li:hover > a,
ul.dropdown-menu > li:focus > a {
background: $headerMenuItemHover !important;
}
ul.dropdown-menu li.divider {
background: $headerMenuItemDivider;
border-bottom-color: $headerMenuItemHover;
}
ul.dropdown-menu li.disabled a {
color: #666;
}
ul.dropdown-menu > li.disabled:hover > a,
ul.dropdown-menu > li.disabled:focus > a {
background: none !important;
span.red-ui-menu-label-container {
width: 180px;
vertical-align: top;
display: inline-block;
text-indent: 0px;
}
span.red-ui-menu-label {
font-size: 14px;
display: inline-block;
text-indent: 0px;
}
span.red-ui-menu-sublabel {
color: #aeaeae;
font-size: 13px;
display: inline-block;
text-indent: 0px;
}
}
> li:hover > a,
> li:focus > a {
background: $headerMenuItemHover !important;
}
li.divider {
background: $headerMenuItemDivider;
border-bottom-color: $headerMenuItemHover;
}
li.disabled a {
color: #666;
}
> li.disabled:hover > a,
> li.disabled:focus > a {
background: none !important;
}
}
/* Deploy menu customisations */
ul#btn-deploy-options-submenu {
ul#red-ui-header-button-deploy-options-submenu {
width: 300px !important;
li a {
padding: 10px 30px;
color: #fff;
span.red-ui-menu-label {
font-size: 16px;
display: inline-block;
text-indent: 0px;
}
> i.fa {
display: none !important;
}
}
}
ul#btn-deploy-options-submenu li a span.menu-label {
font-size: 16px;
display: inline-block;
text-indent: 0px;
}
ul#btn-deploy-options-submenu li a {
padding: 10px 30px;
color: #fff;
}
ul#btn-deploy-options-submenu li a > i.fa {
display: none !important;
}
/* User menu customisations */
ul#btn-usermenu-submenu li a#btn-username > .menu-label {
font-size: 16px;
#usermenu-item-username > .red-ui-menu-label {
color: #fff;
}
#btn-usermenu .user-profile {
#red-ui-header-button-user .user-profile {
background-position: center center;
background-repeat: no-repeat;
background-size: contain;