diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-03-12 16:25:32 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-04-18 15:59:16 +0200 |
| commit | 97aa0a8dec384ad75eb66045f43384b6e54f1d6e (patch) | |
| tree | ff62455c37178caad486a7d1dc90231d91cb6871 /addons/web/static/src/scss/dropdown.scss | |
| parent | b04dec4025013c60e4857c1e177bb20d811cd41a (diff) | |
[REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).
This commit basically changes:
- Variables: @var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @mixin mixin-world {}
- Classes used as mixin: .my_class() -> @extend .my_class
- Here there were no other solution than to convert the use of
a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
- Still need to make sure last variable definition is at the
right place
Diffstat (limited to 'addons/web/static/src/scss/dropdown.scss')
| -rw-r--r-- | addons/web/static/src/scss/dropdown.scss | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/addons/web/static/src/scss/dropdown.scss b/addons/web/static/src/scss/dropdown.scss index 6501b4cc52c..ed979ae3a00 100644 --- a/addons/web/static/src/scss/dropdown.scss +++ b/addons/web/static/src/scss/dropdown.scss @@ -1,12 +1,12 @@ -.li-a-padding { - padding: 3px @odoo-dropdown-hpadding; +%dropdown-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-size: @font-size-base; + background-color: $dropdown-bg; + border: 1px solid $dropdown-border; + font-size: $font-size-base; padding: 5px 0px; box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.176); @@ -14,14 +14,14 @@ padding: 0; > a { display: block; - color: @dropdown-link-color; + color: $dropdown-link-color; - .li-a-padding + @extend %dropdown-li-a-padding; } &.ui-state-focus { background-image: none; - background-color: @odoo-brand-primary; + background-color: $odoo-brand-primary; border: none; font-weight: normal; margin: 0; @@ -29,14 +29,14 @@ &.o_m2o_dropdown_option { padding-left: 20px; > a { - color: @odoo-brand-primary; + color: $odoo-brand-primary; } } } } .dropdown-menu { - box-shadow: 0 6px 12px -4px fade(black, 25%); + box-shadow: 0 6px 12px -4px rgba(black, 0.25); .o_inline_dropdown { position: relative; @@ -51,7 +51,7 @@ } } -.dropdown-menu-mixin { +@mixin dropdown-menu-mixin { .open .dropdown-menu > li { position: relative; // to allow absolute positionning inside the li > a { @@ -59,14 +59,14 @@ outline: none; } - .li-a-padding; + @extend %dropdown-li-a-padding; } &.dropdown-header { - .li-a-padding; - color: @odoo-main-text-color; + @extend %dropdown-li-a-padding; + color: $odoo-main-text-color; - @media (max-width: @screen-xs-max) { + @media (max-width: $screen-xs-max) { color: white; text-decoration: underline; } @@ -74,7 +74,7 @@ } } -.dropdown-menu-mixin(); +@include dropdown-menu-mixin; .navbar-nav { - .dropdown-menu-mixin(); + @include dropdown-menu-mixin; } |
