summaryrefslogtreecommitdiff
path: root/addons/web/static/src/less/dropdown.less
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2016-04-08 14:53:34 +0200
committerGéry Debongnie <ged@odoo.com>2016-04-21 15:21:39 +0200
commit977db823c7c84e9edc7c8cf8384eb9cf47275b3a (patch)
treec3312f745baf11d51f976a60d6e285480f557d4c /addons/web/static/src/less/dropdown.less
parente1bfd3fbda97ac7a64a585b07be161d5be606cf9 (diff)
[REF] web: stop duplicating web
Avoid duplicating web addon in enterprise by extracting a common basis. Enterprise features stay in enterprise, but use that common basis. Mainly: - JS refactoring and linting - Conversion of .sass into .less split into multiple files - Templates cleaning and DOM simplification - Re-generation of web.pot, and update of .po files
Diffstat (limited to 'addons/web/static/src/less/dropdown.less')
-rw-r--r--addons/web/static/src/less/dropdown.less79
1 files changed, 79 insertions, 0 deletions
diff --git a/addons/web/static/src/less/dropdown.less b/addons/web/static/src/less/dropdown.less
new file mode 100644
index 00000000000..5cc6ddbe759
--- /dev/null
+++ b/addons/web/static/src/less/dropdown.less
@@ -0,0 +1,79 @@
+.li-a-padding {
+ padding: 3px @odoo-dropdown-hpadding;
+}
+
+.ui-autocomplete { // Copy style of bootstrap dropdown
+ background-image: none;
+ background-color: @dropdown-bg;
+ border: 1px solid @dropdown-border;
+ font-family: @font-family-serif;
+ 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;
+
+ .li-a-padding
+ }
+
+ &.ui-state-focus {
+ background-image: none;
+ background-color: @odoo-brand-primary;
+ border: none;
+ font-weight: normal;
+ margin: 0;
+ }
+ &.o_m2o_dropdown_option {
+ padding-left: 20px;
+ > a {
+ color: @odoo-brand-primary;
+ }
+ }
+ }
+}
+
+.dropdown-menu {
+ .o_inline_dropdown {
+ position: relative;
+
+ &> .dropdown-menu {
+ top: 0;
+ left: 100%;
+ }
+ &:hover > .dropdown-menu {
+ display: block;
+ }
+ }
+}
+
+.dropdown-menu-mixin {
+ .open .dropdown-menu > li {
+ position: relative; // to allow absolute positionning inside the li
+ > a {
+ &:focus, &:active, &:focus:active {
+ outline: none;
+ }
+
+ .li-a-padding;
+ }
+
+ &.dropdown-header {
+ .li-a-padding;
+ color: @odoo-main-text-color;
+
+ @media (max-width: @screen-xs-max) {
+ color: white;
+ text-decoration: underline;
+ }
+ }
+ }
+}
+
+.dropdown-menu-mixin();
+.navbar-nav {
+ .dropdown-menu-mixin();
+}