Browse Source

Iteration on menu fixes from border changes

pull/2034/head
jlukic 9 years ago
parent
commit
7b3a84f861
4 changed files with 41 additions and 35 deletions
  1. 32
      src/definitions/collections/menu.less
  2. 38
      src/themes/default/collections/menu.variables
  3. 4
      src/themes/default/elements/segment.variables
  4. 2
      src/themes/default/globals/site.variables

32
src/definitions/collections/menu.less

@ -33,6 +33,7 @@
font-family: @fontFamily; font-family: @fontFamily;
background: @background; background: @background;
font-weight: @fontWeight; font-weight: @fontWeight;
border: @border;
box-shadow: @boxShadow; box-shadow: @boxShadow;
border-radius: @borderRadius; border-radius: @borderRadius;
min-height: @minHeight; min-height: @minHeight;
@ -266,6 +267,11 @@
display: block; display: block;
} }
.ui.menu .ui.dropdown .menu > .item .icon:not(.dropdown) {
float: @dropdownItemIconFloat;
margin: @dropdownItemIconMargin;
}
/* Secondary */ /* Secondary */
.ui.secondary.menu .dropdown.item > .menu, .ui.secondary.menu .dropdown.item > .menu,
@ -303,9 +309,6 @@
border-top-right-radius: 0em; border-top-right-radius: 0em;
border-bottom-right-radius: 0em; border-bottom-right-radius: 0em;
} }
.ui.vertical.menu .dropdown.item .menu .item i.icon {
margin-right: 0em;
}
.ui.vertical.menu .dropdown.item.active { .ui.vertical.menu .dropdown.item.active {
box-shadow: none; box-shadow: none;
} }
@ -659,6 +662,7 @@ Floated Menu / Item
background-color: transparent; background-color: transparent;
border-radius: 0em; border-radius: 0em;
box-shadow: none !important; box-shadow: none !important;
border: none;
border-bottom: @tabularBorderWidth solid @tabularBorderColor; border-bottom: @tabularBorderWidth solid @tabularBorderColor;
} }
.ui.tabular.fluid.menu { .ui.tabular.fluid.menu {
@ -771,6 +775,7 @@ Floated Menu / Item
.ui.secondary.menu { .ui.secondary.menu {
background: @secondaryBackground; background: @secondaryBackground;
border-radius: 0em; border-radius: 0em;
border: none;
box-shadow: none; box-shadow: none;
} }
@ -861,7 +866,7 @@ Floated Menu / Item
.ui.secondary.vertical.menu > .item { .ui.secondary.vertical.menu > .item {
border: none; border: none;
margin: @secondaryVerticalItemMargin; margin: @secondaryVerticalItemMargin;
border-radius: @secondaryVerticalItemBorderRadius;
border-radius: @secondaryVerticalItemBorderRadius !important;
} }
.ui.secondary.vertical.menu > .header.item { .ui.secondary.vertical.menu > .header.item {
border-radius: 0em; border-radius: 0em;
@ -958,7 +963,7 @@ Floated Menu / Item
border-bottom: none; border-bottom: none;
border-right-style: solid; border-right-style: solid;
border-right-color: transparent; border-right-color: transparent;
border-radius: 0em;
border-radius: 0em !important;
margin: @secondaryVerticalPointingItemMargin; margin: @secondaryVerticalPointingItemMargin;
border-right-width: @secondaryPointingBorderWidth; border-right-width: @secondaryPointingBorderWidth;
} }
@ -1006,6 +1011,7 @@ Floated Menu / Item
background: none transparent; background: none transparent;
border-radius: 0px; border-radius: 0px;
box-shadow: none; box-shadow: none;
border: none;
margin: @textMenuMargin; margin: @textMenuMargin;
} }
@ -1699,15 +1705,29 @@ Floated Menu / Item
.ui.menu.attached { .ui.menu.attached {
margin: 0rem; margin: 0rem;
border-radius: 0px; border-radius: 0px;
margin-left: -@borderWidth;
margin-right: -@borderWidth;
width: @attachedWidth;
box-shadow: @attachedBoxShadow; /* avoid rgba multiplying */ box-shadow: @attachedBoxShadow; /* avoid rgba multiplying */
} }
.ui.top.attached.menu { .ui.top.attached.menu {
border-radius: @borderRadius @borderRadius 0em 0em; border-radius: @borderRadius @borderRadius 0em 0em;
} }
.ui.menu.bottom.attached {
.ui.bottom.attached.menu {
border-top: none;
border-radius: 0em 0em @borderRadius @borderRadius; border-radius: 0em 0em @borderRadius @borderRadius;
} }
.ui.top.attached.menu:not(.tabular) {
border-bottom: none;
}
.ui.attached.tabular.menu {
margin-left: 0;
margin-right: 0;
width: 100%;
}
/*-------------- /*--------------
Sizes Sizes
---------------*/ ---------------*/

38
src/themes/default/collections/menu.variables

@ -22,10 +22,8 @@
@itemBackground: none; @itemBackground: none;
@fontWeight: normal; @fontWeight: normal;
@borderWidth: 1px; @borderWidth: 1px;
@boxShadow:
0px 0px 0px @borderWidth @borderColor,
@subtleShadow
;
@border: @borderWidth solid @borderColor;
@boxShadow: @subtleShadow;
@borderRadius: @defaultBorderRadius; @borderRadius: @defaultBorderRadius;
@minHeight: (@itemVerticalPadding * 2) + 1em; @minHeight: (@itemVerticalPadding * 2) + 1em;
@ -43,11 +41,7 @@
/* Divider */ /* Divider */
@dividerSize: 1px; @dividerSize: 1px;
@dividerBackground: linear-gradient(
rgba(0, 0, 0, 0.05) 0%,
rgba(0, 0, 0, 0.1) 50%,
rgba(0, 0, 0, 0.05) 100%)
;
@dividerBackground: @borderColor;
/* Sub Menu */ /* Sub Menu */
@subMenuDistance: 0.5em; @subMenuDistance: 0.5em;
@ -138,6 +132,9 @@
@dropdownItemBoxShadow: none; @dropdownItemBoxShadow: none;
@dropdownItemTransition: none; @dropdownItemTransition: none;
@dropdownItemIconFloat: none;
@dropdownItemIconMargin: 0em 0.75em 0em 0em;
@dropdownHoveredItemBackground: @transparentBlack; @dropdownHoveredItemBackground: @transparentBlack;
@dropdownHoveredItemColor: @selectedTextColor; @dropdownHoveredItemColor: @selectedTextColor;
@ -210,17 +207,9 @@
@verticalPointerWidth: 2px; @verticalPointerWidth: 2px;
@verticalBackground: #FFFFFF; @verticalBackground: #FFFFFF;
@verticalItemBackground: none; @verticalItemBackground: none;
@verticalDividerBackground: linear-gradient(to right,
rgba(0, 0, 0, 0.03) 0%,
rgba(0, 0, 0, 0.1) 1.5em,
rgba(0, 0, 0, 0.03) 100%)
;
@verticalDividerBackground: @borderColor;
@verticalActivePointerSize: @verticalPointerWidth;
@verticalActiveBoxShadow:
(@verticalActivePointerSize - @borderWidth) 0em 0em inset,
-@borderWidth 0em 0em
;
@verticalActiveBoxShadow: none;
/* Secondary */ /* Secondary */
@ -396,18 +385,15 @@
@secondaryInvertedHoverColor: @invertedSelectedTextColor; @secondaryInvertedHoverColor: @invertedSelectedTextColor;
/* Inverted Menu Divider */ /* Inverted Menu Divider */
@invertedDividerBackground: rgba(255, 255, 255, 0.08);
@invertedVerticalDividerBackground: linear-gradient(to right,
rgba(255, 255, 255, 0.06) 0%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.06) 100%)
;
@invertedDividerBackground: @invertedBorderColor;
@invertedVerticalDividerBackground: @invertedBorderColor;
/* Fixed */ /* Fixed */
@fixedGridMargin: 2.75rem; @fixedGridMargin: 2.75rem;
/* Attached */ /* Attached */
@attachedBoxShadow: 0px 0px 0px 1px @solidBorderColor;
@attachedBoxShadow: none;
@attachedWidth: ~"calc(100% + "@borderWidth * 2~")";
/* Sizes */ /* Sizes */
@smallWidth: 13rem; @smallWidth: 13rem;

4
src/themes/default/elements/segment.variables

@ -76,10 +76,10 @@
/* Attached */ /* Attached */
@attachedTopOffset: 0px; @attachedTopOffset: 0px;
@attachedBottomOffset: 0px; @attachedBottomOffset: 0px;
@attachedHorizontalOffset: -1px;
@attachedHorizontalOffset: -@borderWidth;
@attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")"; @attachedWidth: ~"calc(100% + "-@attachedHorizontalOffset * 2~")";
@attachedBoxShadow: none; @attachedBoxShadow: none;
@attachedBorder: 1px solid @solidBorderColor;
@attachedBorder: @borderWidth solid @solidBorderColor;
@attachedBottomBoxShadow: @attachedBottomBoxShadow:
@attachedBoxShadow, @attachedBoxShadow,
@subtleShadow @subtleShadow

2
src/themes/default/globals/site.variables

@ -358,7 +358,7 @@
@circularRadius : 500rem; @circularRadius : 500rem;
@borderColor : rgba(34, 36, 38, 0.2);
@borderColor : rgba(34, 36, 38, 0.15);
@selectedBorderColor : rgba(34, 36, 38, 0.3); @selectedBorderColor : rgba(34, 36, 38, 0.3);
@disabledBorderColor : rgba(34, 36, 38, 0.5); @disabledBorderColor : rgba(34, 36, 38, 0.5);

Loading…
Cancel
Save