From b125212b49d6585582aaf4f5388634f319228b9b Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Sat, 20 Feb 2016 18:04:42 +0300 Subject: [PATCH] main menu style refactoing --- src/style/main-menu.scss | 76 ++++++++++++++++++++++++++++++++++++++ src/style/menu.scss | 79 ---------------------------------------- 2 files changed, 76 insertions(+), 79 deletions(-) create mode 100644 src/style/main-menu.scss delete mode 100644 src/style/menu.scss diff --git a/src/style/main-menu.scss b/src/style/main-menu.scss new file mode 100644 index 00000000..fd7d20a7 --- /dev/null +++ b/src/style/main-menu.scss @@ -0,0 +1,76 @@ +@import "variables"; + +.main-menu { + -webkit-overflow-scrolling: touch; + + width: 100%; + position: fixed; + z-index: 100; + overflow-x: scroll; + + background-color: $darker-color; + font-size: 1.1em; + color: $menu-inactive-item-color; + + list-style: none; + white-space: nowrap; + + li { + display: inline-block; + padding: 0.3em 0.2em 0.5em; + margin: 0 0.5em; + + &:first-child { + margin-left: 1em; + } + } + + a{ + text-decoration: none; + + color: $light-color; + border-bottom: 1px solid darken($light-color, 50%); + + &:hover { + color: $lighter-color; + border-bottom: 1px solid darken($lighter-color, 50%); + } + } + + .selected { + font-weight: bold; + border-top: $menu-colored-mark-thickness solid $light-color; + + a:link, a:visited { + color: $lighter-color; + text-decoration: none; + border-bottom: none; + } + + &.blue { + border-top: $menu-colored-mark-thickness solid $blue-color; + } + + &.green { + border-top: $menu-colored-mark-thickness solid $green-color; + } + + &.yellow { + border-top: $menu-colored-mark-thickness solid $yellow-color; + } + + &.pink { + border-top: $menu-colored-mark-thickness solid $pink-color; + } + + &.red { + border-top: $menu-colored-mark-thickness solid $red-color; + } + } +} + +@media (min-width: $mobile-width) { + header{ + overflow: hidden; + } +} diff --git a/src/style/menu.scss b/src/style/menu.scss deleted file mode 100644 index 529033ad..00000000 --- a/src/style/menu.scss +++ /dev/null @@ -1,79 +0,0 @@ -.main-menu { - - position: fixed; - z-index: 100; - overflow-x: scroll; - -webkit-overflow-scrolling: touch; - width: 100%; - //max-height: 15em; - - background-color: black; - font-size: 1.1em; - color: #666; - - list-style: none; - white-space: nowrap; - - & :link, & :visited { - text-decoration: none; - border-bottom: 1px solid #333; - color: #a2a2a2; - } - - li { - display: inline-block; /* 6 */ - padding: 0.3em 0.2em 0.5em; - margin: 0 0.5em; - - &:first-child { - margin-left: 1em; - } - } - - a:hover { - color: white; - border-bottom: 1px solid #555; - } - - .selected { - border-top: 4px solid white; - font-weight: bold; - - a:link, a:visited { - color: white; - text-decoration: none; - border-bottom: none; - } - - &.blue { - border-top: 4px solid #3f9cea; - } - - &.green { - border-top: 4px solid #5cbe40; - } - - &.yellow { - border-top: 4px solid #ffee00; - } - - &.pink { - border-top: 4px solid #f655a0; - } - - &.red { - border-top: 4px solid #f61b14; - } - } -} - -@media (min-width: 31.25em) { - header{ - //max-height: none; - overflow: hidden; - } - - .main-menu { - width: 100%; - } -} \ No newline at end of file