-
Notifications
You must be signed in to change notification settings - Fork 1
feat: improve dropdown, add dark theme, add hover event #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,9 +9,7 @@ $dropdown-box-shadow: 0 0 1rem rgba($black, .175); | |
| $dropdown-color: $body-color; | ||
| $dropdown-divider-bg: $gray-lighter; | ||
| $dropdown-divider-margin-y: $nav-divider-margin-y; | ||
| // FIXME: font-size-content? | ||
| $dropdown-font-size: $font-size-base; | ||
|
|
||
| $dropdown-font-size: $font-size-content-base; | ||
| $dropdown-link-color: $black; | ||
| $dropdown-link-hover-color: $black; | ||
| $dropdown-link-hover-bg: $gray-lighter; | ||
|
|
@@ -20,11 +18,11 @@ $dropdown-link-active-color: $component-active-color; | |
| $dropdown-link-active-bg: $component-active-bg; | ||
| $dropdown-link-disabled-color: $gray-disabled; | ||
|
|
||
| $dropdown-item-padding-y: spacer("1x"); | ||
| $dropdown-item-padding-x: spacer("3x"); | ||
| $dropdown-item-padding-y: spacer("2x"); | ||
| $dropdown-item-padding-x: spacer("2x"); | ||
|
|
||
| $dropdown-header-color: $gray-disabled; | ||
| $dropdown-border-radius: 4px; | ||
| $dropdown-border-radius: 0; | ||
|
|
||
| $caret-width: 0; | ||
| $caret-vertical-align: $caret-width * .85 !default; | ||
|
|
@@ -33,9 +31,55 @@ $caret-spacing: $caret-width * .85 !default; | |
| // Imports | ||
| @import "bootstrap/scss/dropdown"; | ||
|
|
||
| .dropdown.theme-dark { | ||
| color: $white; | ||
|
|
||
| .dropdown-menu { | ||
| background-color: lighten($gray-darker, 5); | ||
| box-shadow: none; | ||
| padding-bottom: 0; | ||
| } | ||
|
|
||
| .dropdown-item { | ||
| color: $white; | ||
| &:hover { | ||
| background-color: $gray-dark; | ||
| } | ||
| } | ||
|
|
||
| .svg-icon { | ||
| width: 1em; | ||
| height: 1em; | ||
| margin-left: 4px; | ||
| fill: $white; | ||
| } | ||
|
|
||
| ._arrow-right { | ||
| &::after { | ||
| border-bottom: 6px solid lighten($gray-darker, 5); | ||
| } | ||
| } | ||
|
|
||
| .dropdown-divider { | ||
| border-top-color: $gray-dark; | ||
| } | ||
| } | ||
|
|
||
| .nav-item.dropdown:hover { | ||
| .nav-link { | ||
| opacity: 1; | ||
| background-color: lighten($gray-darker, 5); | ||
| } | ||
|
|
||
| > .dropdown-menu { | ||
| display: block; | ||
| } | ||
| } | ||
|
Comment on lines
+68
to
+77
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Выпадающее подменю, как думаешь норм такая реализация? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Пока не смотрел, но выглядит на скрине как 2010й год))) |
||
|
|
||
| .dropdown-menu { | ||
| border: none; | ||
| box-shadow: $dropdown-box-shadow; | ||
| margin: -$nav-link-margin 0 0 $nav-link-margin; | ||
| } | ||
|
|
||
| ._arrow-right { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -302,7 +302,7 @@ body { | |
| } | ||
|
|
||
| .dropdown-user-menu { | ||
| margin-left: auto; | ||
| margin-left: auto; //for mobile view | ||
| margin-right: -$navbar-toggler-padding-x; | ||
|
|
||
| ._user { | ||
|
|
@@ -320,9 +320,13 @@ body { | |
| } | ||
|
|
||
| .dropdown-menu { | ||
| font-size: $font-size-content-base; | ||
| right: $navbar-toggler-padding-x; | ||
| left: auto; | ||
| border-radius: 4px; | ||
| } | ||
|
|
||
| .dropdown-item { | ||
| padding: spacer("1x") spacer("3x"); | ||
|
Comment on lines
+325
to
+329
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Кастомные свойства для |
||
| } | ||
|
|
||
| .btn { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Значения по умолчанию. Меню пользователя
.dropdown-user-menuмодификатор.