summaryrefslogtreecommitdiff
path: root/addons/web/static/src/less
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-11-12 22:02:16 +0100
committerGéry Debongnie <ged@odoo.com>2017-11-13 11:59:23 +0100
commit75b039345425bcd309d8fa6c4fe8b77231b450ff (patch)
treed9868c945633a3383ea4cca21a5518777de630e1 /addons/web/static/src/less
parentb8fb8ad3f0596835f4dc0a0c62ab230c4519a4f6 (diff)
[FIX] web: remove slow css rule
We do not take CSS seriously enough, but it has an impact on rendering speed. The rule removed in this commit slowed down the Qunit JS test suite by a considerable amount: With a fresh db with no extra addon installed, community version: - in chrome, before this commit: 103.2s, with this commit: 54.8s - in firefox, before this commit: 194.9s, with this commit: 117.7s This is due to the way rendering is done in web browser. They start checking css rules from the right, so the *:nth-last-child(2) rule was checked for every element in the dom, each time it was added/modified. Note that the rule just above (*:first-child) had no noticeable impact, but I still think that the universal css selector should still be avoided in general. The fun part is that I did not find the place where this rule was supposed to be applied. I assume that it is just a dead rule. If this is not the case, we can reintroduce the margin-top with the class mt0, applied on the specific element.
Diffstat (limited to 'addons/web/static/src/less')
-rw-r--r--addons/web/static/src/less/rainbow.less3
1 files changed, 0 insertions, 3 deletions
diff --git a/addons/web/static/src/less/rainbow.less b/addons/web/static/src/less/rainbow.less
index ec5a701d31d..2342a7f2718 100644
--- a/addons/web/static/src/less/rainbow.less
+++ b/addons/web/static/src/less/rainbow.less
@@ -147,9 +147,6 @@
*:first-child {
margin-top: 0;
}
- *:nth-last-child(2) {
- margin-bottom: 0;
- }
}
.o_reward_msg_content {