summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss/dropdown.scss
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/web/static/src/scss/dropdown.scss
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/web/static/src/scss/dropdown.scss')
-rw-r--r--addons/web/static/src/scss/dropdown.scss91
1 files changed, 91 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/dropdown.scss b/addons/web/static/src/scss/dropdown.scss
new file mode 100644
index 00000000..30db84f2
--- /dev/null
+++ b/addons/web/static/src/scss/dropdown.scss
@@ -0,0 +1,91 @@
+%dropdown-li-a-padding {
+ padding: 3px $o-dropdown-hpadding;
+}
+
+.ui-autocomplete { // Copy style of bootstrap dropdown
+ background-image: none;
+ background-color: $dropdown-bg;
+ border: $dropdown-border-width solid $dropdown-border-color;
+ font-size: $font-size-base;
+ padding: 5px 0px;
+ box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176);
+
+ .ui-menu-item {
+ padding: 0;
+ > a {
+ display: block;
+ color: $dropdown-link-color;
+
+ @extend %dropdown-li-a-padding;
+
+ &.ui-state-active {
+ border: none;
+ font-weight: normal;
+ margin: 0;
+ }
+ }
+ &.o_m2o_dropdown_option, &.o_m2o_start_typing {
+ text-indent: 20px
+ }
+ &.o_m2o_start_typing {
+ font-style: italic;
+ cursor: default;
+ a.ui-menu-item-wrapper, a.ui-state-active, a.ui-state-active:hover {
+ background: none;
+ }
+ }
+ }
+}
+
+.dropdown-menu {
+ box-shadow: 0 6px 12px -4px rgba(black, 0.25);
+
+ .o_inline_dropdown {
+ position: relative;
+
+ & > .dropdown-menu {
+ top: 0;
+ left: 100%;
+ }
+ &:hover .dropdown-menu {
+ display: block;
+ }
+ }
+}
+
+@mixin dropdown-menu-mixin {
+ .show .dropdown-menu {
+ > * {
+ position: relative; // to allow absolute positionning inside the items
+ }
+
+ .dropdown-item {
+ &:focus, &:active, &:focus:active {
+ outline: none;
+ }
+
+ @extend %dropdown-li-a-padding;
+ }
+
+ .dropdown-header {
+ @extend %dropdown-li-a-padding;
+ color: $o-main-text-color;
+
+ @include media-breakpoint-down(sm) {
+ color: white;
+ text-decoration: underline;
+ }
+ }
+ }
+}
+
+@include dropdown-menu-mixin;
+.navbar-nav {
+ @include dropdown-menu-mixin;
+}
+
+.o_rtl {
+ .dropdown-menu {
+ left: auto;
+ }
+}