diff options
author | winh <winnie@gitlab.com> | 2017-08-01 19:27:21 +0200 |
---|---|---|
committer | winh <winnie@gitlab.com> | 2017-08-01 20:34:18 +0200 |
commit | 430daf17969dec2a315c8c528d7c2d9416c4e64a (patch) | |
tree | 49618b149bd4a7a10669d708b450c742357172a9 | |
parent | cf4b39a6def577ae46c831d9b5074308ee11315e (diff) | |
download | gitlab-ce-winh-project-page-dropdown-style.tar.gz |
Move new dropdown styles to a mixinwinh-project-page-dropdown-style
-rw-r--r-- | app/assets/stylesheets/framework/dropdowns.scss | 45 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/projects.scss | 45 |
2 files changed, 47 insertions, 43 deletions
diff --git a/app/assets/stylesheets/framework/dropdowns.scss b/app/assets/stylesheets/framework/dropdowns.scss index 3f934403147..572203bce34 100644 --- a/app/assets/stylesheets/framework/dropdowns.scss +++ b/app/assets/stylesheets/framework/dropdowns.scss @@ -722,3 +722,48 @@ @include set-invisible; overflow: hidden; } + +// TODO: change global style and remove mixin +@mixin new-style-dropdown { + .dropdown-menu { + li { + padding: 0 1px; + + &.dropdown-header { + padding: 8px 16px; + } + + a { + border-radius: 0; + padding: 8px 16px; + + &.is-focused, + &:hover, + &:active, + &:focus { + background-color: $gray-darker; + } + + &.is-active { + font-weight: inherit; + + &::before { + top: 16px; + } + } + } + } + + &.dropdown-menu-selectable { + li { + a { + padding: 8px 40px; + + &.is-active::before { + left: 16px; + } + } + } + } + } +} diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 27337c92180..d29421aa1b3 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -282,53 +282,12 @@ } .project-repo-buttons { + @include new-style-dropdown; + .project-action-button .dropdown-menu { max-height: 250px; overflow-y: auto; } - - // TODO: fallback to global style - .dropdown-menu { - li { - padding: 0 1px; - - &.dropdown-header { - padding: 8px 16px; - } - - a { - border-radius: 0; - padding: 8px 16px; - - &.is-focused, - &:hover, - &:active, - &:focus { - background-color: $gray-darker; - } - - &.is-active { - font-weight: inherit; - - &::before { - top: 16px; - } - } - } - } - } - - .dropdown-menu.dropdown-menu-selectable { - li { - a { - padding: 8px 40px; - - &.is-active::before { - left: 16px; - } - } - } - } } .split-one { |