summaryrefslogtreecommitdiff
path: root/addons/web/static/src/css
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-07-16 15:24:02 +0200
committerAaron Bohy <aab@odoo.com>2015-07-17 09:53:30 +0200
commit16eb36ff45bec31cfb98865b739c34e0a513a02f (patch)
treecebe52ba39aacb0f924f8ce447f9827239adb9a9 /addons/web/static/src/css
parentc22d75bdc541919a1dc861645d1e0306ab62be9c (diff)
[IMP] web: use a classname to show/hide widgets
The problem of $el.show()/hide() is that calling show() on a jQuery element on which there is no display rule in the stylesheet automatically sets 'display: block'. However, when a jQuery element is not yet in the DOM, the rules defined on it are not yet applied, meaning that calling show() will set its display to block (in inline style), even if there is different a css rule (e.g. 'dislay: flex'). As the inline style takes the priority over the stylesheet, the correct display won't be applied, even when the widget will be appended in the DOM, resulting in a possibly broken layout.
Diffstat (limited to 'addons/web/static/src/css')
-rw-r--r--addons/web/static/src/css/base.css13
-rw-r--r--addons/web/static/src/css/base.sass3
2 files changed, 8 insertions, 8 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 7852f764c19..d7b19640716 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -1,4 +1,4 @@
-@charset "utf-8";
+@charset "UTF-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
@@ -73,6 +73,10 @@
vertical-align: middle;
}
+.o_hidden {
+ display: none !important;
+}
+
.openerp {
padding: 0;
margin: 0;
@@ -1282,13 +1286,6 @@
.openerp .oe-search-options .filters-menu .divider {
display: list-item;
}
-.openerp .oe-search-options .closed-menu a:before {
- font-family: FontAwesome;
- position: absolute;
- left: 12px;
- top: 3px;
- content: "";
-}
.openerp .oe-search-options .oe-select-group {
margin: 3px 25px;
}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index d8248feb9ad..fe4cbac46f0 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -182,6 +182,9 @@ $sheet-padding: 16px
vertical-align: middle
// }}}
+.o_hidden
+ display: none!important
+
.openerp
// Global style {{{
padding: 0