diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-02-15 18:14:58 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-04-18 15:59:18 +0200 |
| commit | fbfd0119041ca7dc830796e76d9ae5c303459d4f (patch) | |
| tree | e30dd1a85988a97411a6d00945248fa1166cf465 /addons/mail/static/src | |
| parent | 97aa0a8dec384ad75eb66045f43384b6e54f1d6e (diff) | |
[REF] *: get rid of introduced @extend
During first scss convertion, classes called as mixins were changed to
an @extend instruction which was the best approximation given the fact
there is no equivalent in sass to do that. The problem is that the
instruction is slowing the scss computation a lot and might also break
the style in unexpected ways because of the complex unwanted selectors
the instruction induces.
This commit removes the need of extends. This is done case per case.
Sometimes this involves adding classes in xml, sometimes to change the
style a little, ... The button rendering refactoring which was made
at the start of the LESS to SASS merge was also done in prevision of
this.
After this commit, sass computation is like 5-6 times faster than less
computation while it was like 10 times *slower* before this commit.
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/scss/systray.scss | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/scss/thread.scss | 4 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/activity.xml | 2 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/systray.xml | 9 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/thread.xml | 6 |
5 files changed, 8 insertions, 15 deletions
diff --git a/addons/mail/static/src/scss/systray.scss b/addons/mail/static/src/scss/systray.scss index 958e1ff2c08..c06bde1d3f1 100644 --- a/addons/mail/static/src/scss/systray.scss +++ b/addons/mail/static/src/scss/systray.scss @@ -45,7 +45,6 @@ border-bottom: 1px solid $gray-lighter-darker; box-shadow: 0 0 2px $gray-lighter-darker; .o_filter_button, .o_new_message { - @extend .btn-link; // FIXME was a mixin before scss convertion padding: 5px; } .o_filter_button { @@ -87,7 +86,6 @@ } } .o_activity_filter_button { - @extend .btn-link; // FIXME was a mixin before scss convertion padding: 2px; } .o_no_activity { diff --git a/addons/mail/static/src/scss/thread.scss b/addons/mail/static/src/scss/thread.scss index 9f9ace65de9..4a2edb68913 100644 --- a/addons/mail/static/src/scss/thread.scss +++ b/addons/mail/static/src/scss/thread.scss @@ -144,10 +144,6 @@ .o_mail_info { margin-bottom: 2px; - @extend .text-muted; // FIXME was a mixin before scss convertion - .o_mail_mailto, .o_mail_mailto:hover { - @extend .text-muted; // FIXME was a mixin before scss convertion - } strong { color: $headings-color; diff --git a/addons/mail/static/src/xml/activity.xml b/addons/mail/static/src/xml/activity.xml index fadb93dfa7d..9bdcfcdcb90 100644 --- a/addons/mail/static/src/xml/activity.xml +++ b/addons/mail/static/src/xml/activity.xml @@ -23,7 +23,7 @@ </div> </div> <div class="o_thread_message_core"> - <div class="o_mail_info"> + <div class="o_mail_info text-muted"> <strong><span t-attf-class="o_activity_date o_activity_color_#{activity.state}"><t t-esc="activity.label_delay" /></span></strong>: <strong t-if="activity.summary"> “<t t-esc="activity.summary"/>”</strong> <strong t-if="!activity.summary"> <t t-esc="activity.activity_type_id[1]" /></strong> diff --git a/addons/mail/static/src/xml/systray.xml b/addons/mail/static/src/xml/systray.xml index dd61c486b9b..54df73c1b94 100644 --- a/addons/mail/static/src/xml/systray.xml +++ b/addons/mail/static/src/xml/systray.xml @@ -14,11 +14,11 @@ </li> <li t-if="!widget.isMobile" class="o_mail_navbar_dropdown_top"> <div> - <button type="button" class="btn btn-sm o_filter_button active"> All </button> - <button type="button" class="btn btn-sm o_filter_button" data-filter='chat'> Chat </button> - <button type="button" class="btn btn-sm o_filter_button" data-filter='channels'> Channels </button> + <button type="button" class="btn btn-sm btn-link o_filter_button active"> All </button> + <button type="button" class="btn btn-sm btn-link o_filter_button" data-filter='chat'> Chat </button> + <button type="button" class="btn btn-sm btn-link o_filter_button" data-filter='channels'> Channels </button> </div> - <button type="button" class="btn btn-sm o_new_message"> New message </button> + <button type="button" class="btn btn-sm btn-link o_new_message"> New message </button> </li> <li class="o_mail_navbar_dropdown_channels"/> <li t-if="widget.isMobile"> @@ -93,4 +93,3 @@ </li> </t> </templates> - diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml index 118e96da8ff..c3aa2388154 100644 --- a/addons/mail/static/src/xml/thread.xml +++ b/addons/mail/static/src/xml/thread.xml @@ -142,14 +142,14 @@ t-att-class="'fa o_thread_message_star o_thread_icon ' + (message.is_starred ? 'fa-star' : 'fa-star-o')" t-att-data-message-id="message.id" title="Mark as Todo"/> </div> - <div class='o_thread_message_core'> - <p t-if="message.display_author" class="o_mail_info"> + <div class="o_thread_message_core"> + <p t-if="message.display_author" class="o_mail_info text-muted"> <t t-if="message.is_note"> Note by </t> <strong t-if="message.mailto"> - <a class="o_mail_mailto" t-attf-href="mailto:#{message.mailto}?subject=Re: #{message.subject}"> + <a class="text-muted" t-attf-href="mailto:#{message.mailto}?subject=Re: #{message.subject}"> <t t-esc="message.mailto"/> </a> </strong> |
