diff options
| author | Aaron Bohy <aab@odoo.com> | 2015-07-16 15:24:02 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2015-07-17 09:53:30 +0200 |
| commit | 16eb36ff45bec31cfb98865b739c34e0a513a02f (patch) | |
| tree | cebe52ba39aacb0f924f8ce447f9827239adb9a9 /addons/web/static/src/css/base.sass | |
| parent | c22d75bdc541919a1dc861645d1e0306ab62be9c (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/base.sass')
| -rw-r--r-- | addons/web/static/src/css/base.sass | 3 |
1 files changed, 3 insertions, 0 deletions
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 |
