summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/less
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-02-24 11:51:43 +0100
committerqsm-odoo <qsm@odoo.com>2016-02-24 13:09:48 +0100
commit5b65befcd889139152c590490fb8965c9f4b5279 (patch)
tree8c82983ec486274372db96a70620805e3ea80454 /addons/web_editor/static/src/less
parent40334b3342df66ff93e511a97107e6df6c209e21 (diff)
[REF] web,web_editor,website,report,mass_mailing,mail: LESS
* Convert some CSS to LESS * Split/Join LESS files * Remove duplicates between website and web_editor * UI improvements * Allow simple customizations thanks to LESS var&mixins for website
Diffstat (limited to 'addons/web_editor/static/src/less')
-rw-r--r--addons/web_editor/static/src/less/web_editor.backend.less143
-rw-r--r--addons/web_editor/static/src/less/web_editor.common.less297
-rw-r--r--addons/web_editor/static/src/less/web_editor.components.less276
-rw-r--r--addons/web_editor/static/src/less/web_editor.interactions.less61
-rw-r--r--addons/web_editor/static/src/less/web_editor.less63
-rw-r--r--addons/web_editor/static/src/less/web_editor.mixins.less204
-rw-r--r--addons/web_editor/static/src/less/web_editor.ui.components.less339
-rw-r--r--addons/web_editor/static/src/less/web_editor.ui.less1771
-rw-r--r--addons/web_editor/static/src/less/web_editor.variables.less151
9 files changed, 1556 insertions, 1749 deletions
diff --git a/addons/web_editor/static/src/less/web_editor.backend.less b/addons/web_editor/static/src/less/web_editor.backend.less
index e9043dc138e..0ff97e327aa 100644
--- a/addons/web_editor/static/src/less/web_editor.backend.less
+++ b/addons/web_editor/static/src/less/web_editor.backend.less
@@ -1,88 +1,85 @@
.oe_form_field_html_text {
- .note-editable {
- min-height: 180px;
- font: initial !important;
- font-family: inherit !important;
- line-height: initial !important;
- color: initial !important;
- p {
- margin: initial;
+ .note-editable {
+ min-height: 180px;
+ font: initial !important;
+ font-family: inherit !important;
+ line-height: initial !important;
+ color: initial !important;
+ p {
+ margin: initial;
+ font-family: 'Lucida Grande', Helvetica, Verdana, Arial, sans-serif;
+ -webkit-margin-before: 0;
+ font-size: 13px;
+ }
+ a, a:hover {
+ color: initial;
+ }
}
- a, a:hover {
- color: initial;
+ .o_readonly {
+ min-height: 1em;
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ border: 0;
}
}
-.oe_form_field_html_text .o_readonly {
- min-height: 1em;
+.oe_form_field_html iframe {
+ display: block;
width: 100%;
- margin: 0;
- padding: 0;
border: 0;
+ padding: 0;
+ margin: 0;
+ min-height: 300px;
+ min-height: -webkit-calc(100vh - 170px);
+ min-height: calc(100vh - 170px);
}
-.oe_form_field_html_text .note-editable p {
- font-family: 'Lucida Grande', Helvetica, Verdana, Arial, sans-serif;
- -webkit-margin-before: 0;
- font-size: 13px;
-}
-
-.oe_form_field_html iframe {
- display: block;
- width: 100%;
- border: 0;
- padding: 0;
- margin: 0;
- min-height: 300px;
- min-height: -webkit-calc(100vh - 170px);
- min-height: calc(100vh - 170px);
-}
-.o_form_FieldTextHtml_fullscreen{
- .oe_form_field_html.o_form_fullscreen_ancestor iframe {
- position: absolute !important;
- left: 0 !important;
- right: 0 !important;
- top: 0 !important;
- bottom: 0 !important;
- width: 100% !important;
- min-height: 100% !important;
- z-index: 1001 !important;
- border: 0;
- }
- * {
- display: none;
- }
- .o_form_fullscreen_ancestor {
- display: block !important;
- position: static !important;
- top: 0 !important;
- left: 0 !important;
- overflow: visible !important;
- width: auto !important;
- overflow: hidden !important;
- }
+.o_form_FieldTextHtml_fullscreen {
+ .oe_form_field_html.o_form_fullscreen_ancestor iframe {
+ position: absolute !important;
+ left: 0 !important;
+ right: 0 !important;
+ top: 0 !important;
+ bottom: 0 !important;
+ width: 100% !important;
+ min-height: 100% !important;
+ z-index: 1001 !important;
+ border: 0;
+ }
+ * {
+ display: none;
+ }
+ .o_form_fullscreen_ancestor {
+ display: block !important;
+ position: static !important;
+ top: 0 !important;
+ left: 0 !important;
+ overflow: visible !important;
+ width: auto !important;
+ overflow: hidden !important;
+ }
}
.openerp .oe_form .oe_form_field_html_translate textarea {
- min-width: 60px;
- width: 100%;
- color: #4c4c4c;
- font: normal 13px "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
+ min-width: 60px;
+ width: 100%;
+ color: #4c4c4c;
+ font: normal 13px "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
}
.openerp .oe_form_readonly .oe_form .oe_form_field_html_translate textarea {
- border:0;
- background: #fff;
+ border: 0;
+ background: #fff;
}
.openerp .oe_form_editable .oe_form .oe_form_field_html_translate {
- > button {
- float: right;
- margin: -6px -3px 0 0;
- }
- > .note-editable {
- border: 1px solid #ccc;
- min-height: 22px;
- border-radius: 3px;
- }
-}
-
-.openerp .oe_form_editable .oe_form .oe_form_field_html_translate .note-editable [contentEditable='true']:hover {
- .box-shadow(#DDCC33 0 0 5px 2px inset);
+ > button {
+ float: right;
+ margin: -6px -3px 0 0;
+ }
+ > .note-editable {
+ border: 1px solid #ccc;
+ min-height: 22px;
+ border-radius: 3px;
+ }
+ .note-editable [contentEditable='true']:hover {
+ box-shadow: #DDCC33 0 0 5px 2px inset;
+ }
}
diff --git a/addons/web_editor/static/src/less/web_editor.common.less b/addons/web_editor/static/src/less/web_editor.common.less
index f83b5628b4e..a7dc0edb622 100644
--- a/addons/web_editor/static/src/less/web_editor.common.less
+++ b/addons/web_editor/static/src/less/web_editor.common.less
@@ -1,166 +1,279 @@
+html, body {
+ width: 100%;
+ height: 100%;
+}
+
/* ----- EDITOR ----- */
.css_non_editable_mode_hidden {
- display: none !important;
+ display: none !important;
}
/* ----- Editor (for public user, like forum) ----- */
.note-toolbar {
- margin-left: 0 !important;
+ margin-left: 0 !important;
}
.note-popover .popover > .arrow {
- display: none;
+ display: none;
}
/* ----- GENERIC LAYOUTING HELPERS ---- */
-.hidden {
- display: none !important;
-}
-
/* table */
-#wrapwrap table.table, .o_editable table.table {
- table-layout: fixed;
-}
-#wrapwrap table.table td, .o_editable table.table td {
- min-width: 20px;
+#wrapwrap, .o_editable {
+ table.table {
+ table-layout: fixed;
+ td {
+ min-width: 20px;
+ }
+ }
}
/* Media */
img.shadow {
- -moz-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
- -webkit-box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
- box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
+ box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.2);
}
img.padding-small, .img.padding-small, span.fa.padding-small, iframe.padding-small {
- padding: 4px;
+ padding: 4px;
}
img.padding-medium, .img.padding-medium, span.fa.padding-medium, iframe.padding-medium {
- padding: 8px;
+ padding: 8px;
}
img.padding-large, .img.padding-large, span.fa.padding-large, iframe.padding-large {
- padding: 16px;
+ padding: 16px;
}
img.padding-xl, .img.padding-xl, span.fa.padding-xl, iframe.padding-xl {
- padding: 32px;
+ padding: 32px;
}
-div.media_iframe_video.padding-small iframe {
- padding: 4px;
-}
-div.media_iframe_video.padding-medium iframe {
- padding: 8px;
-}
-div.media_iframe_video.padding-large iframe {
- padding: 16px;
-}
-div.media_iframe_video.padding-xl iframe {
- padding: 32px;
+div.media_iframe_video {
+ &.padding-small iframe {
+ padding: 4px;
+ }
+ &.padding-medium iframe {
+ padding: 8px;
+ }
+ &.padding-large iframe {
+ padding: 16px;
+ }
+ &.padding-xl iframe {
+ padding: 32px;
+ }
}
/* font awsome */
.fa-6x {
- font-size: 6em;
+ font-size: 6em;
}
.fa-7x {
- font-size: 7em;
+ font-size: 7em;
}
.fa-8x {
- font-size: 8em;
+ font-size: 8em;
}
.fa-9x {
- font-size: 9em;
+ font-size: 9em;
}
.fa-10x {
- font-size: 10em;
+ font-size: 10em;
}
.fa.center-block {
- text-align: center;
+ text-align: center;
}
/* video */
div.media_iframe_video {
- margin: 0 auto;
- text-align: center;
- position: relative;
- overflow: hidden;
-}
-div.media_iframe_video iframe {
- width: 100%;
- height: 100%;
- top: 0;
- position: absolute;
- margin: 0 auto;
- margin-left: -50%;
-}
-div.media_iframe_video .media_iframe_video_size {
- padding-bottom: 66.5%;
- position: relative;
- width: 100%;
- height: 0;
-}
-div.media_iframe_video .css_editable_mode_display {
- position: absolute;
- width: 100%;
- height: 100%;
- display: none;
- z-index: 2;
+ margin: 0 auto;
+ text-align: center;
+ position: relative;
+ overflow: hidden;
+
+ iframe {
+ width: 100%;
+ height: 100%;
+ .o-position-absolute(@top: 0);
+ margin: 0 auto;
+ margin-left: -50%;
+ }
+
+ .media_iframe_video_size {
+ padding-bottom: 66.5%;
+ position: relative;
+ width: 100%;
+ height: 0;
+ }
+
+ .css_editable_mode_display {
+ .o-position-absolute();
+ width: 100%;
+ height: 100%;
+ display: none;
+ z-index: 2;
+ }
}
html[data-browser^="msie"] div.media_iframe_video iframe {
- margin-left: 0;
+ margin-left: 0;
}
/* Mobile view */
-@media (max-width: 768px) {
- img:not(.cke_iframe), .media_iframe_video, span.fa, i.fa {
- -webkit-transform: none !important;
- -moz-transform: none !important;
- -ms-transform: none !important;
- -o-transform: none !important;
- transform: none !important;
- }
+@media (max-width: @screen-xs-max) {
+ img:not(.cke_iframe), .media_iframe_video, span.fa, i.fa {
+ -webkit-transform: none !important;
+ -moz-transform: none !important;
+ -ms-transform: none !important;
+ -o-transform: none !important;
+ transform: none !important;
+ }
}
+
/* ---- fields --- */
-address .fa.fa-mobile-phone {
- margin: 0 3px 0 2px;
-}
-address .fa.fa-file-text-o {
- margin-right: 1px;
+address {
+ .fa.fa-mobile-phone {
+ margin: 0 3px 0 2px;
+ }
+ .fa.fa-file-text-o {
+ margin-right: 1px;
+ }
}
span[data-oe-type="monetary"] {
- white-space: nowrap;
+ white-space: nowrap;
}
/* ---- MENU ---- {{{ */
div.oe_menu_buttons {
- top: -8px;
- right: -8px;
+ top: -8px;
+ right: -8px;
}
-ul.oe_menu_editor .fa-home {
- display: none;
+ul.oe_menu_editor {
+ .fa-home {
+ display: none;
+ }
+ > li:first-child > div > span > .fa-home {
+ display: block;
+ }
+ .oe_menu_placeholder {
+ outline: 1px dashed #4183C4;
+ }
+ ul {
+ list-style: none;
+ }
+ li div {
+ cursor: move;
+ }
+ .disclose {
+ cursor: pointer;
+ width: 10px;
+ display: none;
+ }
}
-ul.oe_menu_editor > li:first-child > div > span > .fa-home {
- display: block;
+
+// Generate all margins for all sizes
+.o-margins-all(@factor: 1) {
+ // Unfortunately, the margins sizes are not
+ // mathematically related by a single function
+ .o-margins(128, @factor);
+ .o-margins(96, @factor);
+ .o-margins(92, @factor);
+ .o-margins(64, @factor);
+ .o-margins(48, @factor);
+ .o-margins(32, @factor);
+ .o-margins(24, @factor);
+ .o-margins(16, @factor);
+ .o-margins(8, @factor);
+ .o-margins(4, @factor);
+ .o-margins(0, @factor);
}
-ul.oe_menu_editor .oe_menu_placeholder {
- outline: 1px dashed #4183C4;
+
+// Generate all margins for one size, scalled by a
+// given factor (0 <= factor <= 1)
+.o-margins(@name, @factor: 1) {
+ .o-margins-define(@name, @factor * @name);
}
-ul.oe_menu_editor ul {
- list-style: none;
+
+// Generate all margins for one size, given
+// the name of the margin and intended size
+.o-margins-define(@name, @size: @name) {
+ .mt@{name} {margin-top: ~"@{size}px"!important;}
+ .mb@{name} {margin-bottom: ~"@{size}px"!important;}
+ .ml@{name} {margin-left: ~"@{size}px"!important;}
+ .mr@{name} {margin-right: ~"@{size}px"!important;}
}
-ul.oe_menu_editor li div {
- cursor: move;
+
+// Generate all margins
+.o-margins-all();
+
+// Possibility to change the margins ratio for small screen sizes, e.g.:
+// @media (max-width: 768px) {
+// .o-margins-all(0.75);
+// }
+// Possibility to only redefine single margins for small screen sizes, e.g.:
+// @media (max-width: 768px) {
+// .o-margins(64, 0.50);
+// .o-margins(48, 0.50);
+// }
+// Possibility to directly redefine the size of single margins instead of refering to a factor for small screen sizes, e.g.:
+// @media (max-width: 768px) {
+// .o-margins-define(128, 48);
+// .o-margins-define(96, 48);
+// .o-margins-define(64, 48);
+// }
+
+a.o_underline {
+ text-decoration: underline;
+ &:hover {
+ text-decoration: underline;
+ }
}
-ul.oe_menu_editor .disclose {
- cursor: pointer;
- width: 10px;
- display: none;
+
+// Colors
+@gray-white: #fff;
+
+@color-alpha: #1cc1a9;
+@color-beta: #a24689;
+@color-gamma: #BA3C3D;
+@color-delta: #0D6759;
+@color-epsilon: #0B2E59;
+
+.o-create-color-classes(@class_name, @color, @complementary: contrast(@color, @text-color, #FFF, 60%)) {
+ .bg-@{class_name} {
+ background-color: @color;
+ color: @complementary;
+ .text-muted {
+ color: fade(@complementary, 40%);
+ }
+ }
+ body .text-@{class_name} { // html to make the rules more important that bg-* ones
+ color: @color;
+ }
}
+
+// Create classes for theme colors
+.o-create-color-classes(alpha, @color-alpha);
+.o-create-color-classes(beta, @color-beta);
+.o-create-color-classes(gamma, @color-gamma);
+.o-create-color-classes(delta, @color-delta);
+.o-create-color-classes(epsilon, @color-epsilon);
+
+// Create classes for UI colors
+.o-create-color-classes(primary, @brand-primary);
+.o-create-color-classes(success, @brand-success);
+.o-create-color-classes(info, @brand-info);
+.o-create-color-classes(warning, @brand-warning);
+.o-create-color-classes(danger, @brand-danger);
+
+// Create classes for greyscale colors
+.o-create-color-classes(~'black', @gray-base);
+.o-create-color-classes(~'gray-darker', @gray-darker);
+.o-create-color-classes(~'gray-dark', @gray-dark);
+.o-create-color-classes(~'gray', @gray);
+.o-create-color-classes(~'gray-light', @gray-light);
+.o-create-color-classes(~'gray-lighter', @gray-lighter);
+.o-create-color-classes(~'white', @gray-white);
diff --git a/addons/web_editor/static/src/less/web_editor.components.less b/addons/web_editor/static/src/less/web_editor.components.less
deleted file mode 100644
index d24df7ac99f..00000000000
--- a/addons/web_editor/static/src/less/web_editor.components.less
+++ /dev/null
@@ -1,276 +0,0 @@
-#web_editor-top-actions {
- a {
- .transition(all 0.3s);
- color: darken(@we_color-primary, 10%);
- &:hover, &:active {
- text-decoration: none;
- color: darken(@we_color-primary, 20%);
- }
- }
- // BUTTONS
- // ====================
- .btn {
- font-size: 12px;
- color: #999999;
- font-weight: bold;
- text-decoration: none;
- .transition(all 0.3s);
- &:hover, &:focus {
- color: white;
- text-decoration: none;
- }
- &.accent {
- .button-variant(white, @we_color-accent, @we_color-accent)
- }
- &.compl {
- .button-variant(white, @we_color-primary, @we_color-primary)
- }
- &.full {
- margin-top: 0;
- margin-bottom: 0;
- border-radius: 0;
- .box-shadow(none);
- }
- &.btn-primary {
- .button-variant(white, @we_color-accent, @we_color-accent);
- text-transform: uppercase;
- }
- &.btn-danger {
- .button-variant(white, @we_color-danger, @we_color-danger);
- text-transform: uppercase;
- }
- &.btn-success {
- .button-variant(white, @we_color-success, @we_color-success);
- text-transform: uppercase;
- }
- }
- .dropdown-toggle {
- color: @we_dropdown-toggle-color;
- height: @we_editor-bar-height - @we_editor-dropdown-border-height;
- line-height: @we_editor-bar-height - @we_editor-dropdown-border-height;
- border-top: @we_editor-dropdown-border-height solid transparent;
- text-shadow:0 1px 0 @we_dropdown-toggle-shadow-color;
- }
- .dropdown-menu {
- margin: 0;
- overflow: hidden;
- border-radius: 0;
- border: none;
- background-color: @we_dropdown-menu-color;
- .box-shadow(@we_box-shadow);
- li {
- a {
- color: @we_dropdown-toggle-color;
- }
- &:hover {
- a {
- color: @we_dropdown--open-toggle-color;
- background: transparent;
- }
- }
- }
- li.divider {
- margin: 3px 20px;
- background-color: @we_color-inactive;
- }
- }
- .open {
- > .dropdown-toggle {
- background-color: @we_dropdown--open-toggle-bg-color;
- color: @we_dropdown--open-toggle-color;
- border-top: @we_editor-dropdown-border-height solid white;
- text-shadow:0 1px 0 @we_dropdown--open-toggle-shadow-color;
- }
- }
- .dropdown-menu {
- position: absolute;
- left: auto;
- right: 0;
- }
-
- // ICONS
- // ======================
- .material-icons {
- font-size: 1em;
- .translateY(2px);
- margin-right: 5px;
- }
-
- // POPOVERS
- // ======================
- .popover {
- border-radius: 3px;
- .popover-title{
- color: @we_color-text-dark
- }
- }
-
- // INPUTS
- // ======================
- .form-control {
- font-weight: bold;
- color: @we_color-text-dark;
- }
- .input-group-addon{
- color: @we_color-text-dark;
- font-weight: bold;
- }
-}
-
-// INPUTS
-// ==================
-.switch {
- position: relative;
- display: inline-block;
- box-sizing: border-box;
- margin: 0 0.5em;
- padding: 0;
- height: 1.5em;
- cursor: pointer;
- .translateY(0.2em);
- .switch_track {
- background: #bababa;
- border-radius: 0.4em;
- height: 1em;
- width: 2.5em;
- display: inline-block;
- .transition(all 0.3s @we_md-ease);
- &:after {
- content: "";
- background: #fafafa;
- display: block;
- width: 1.5em;
- height: 1.5em;
- border-radius: 100em;
- margin-top: -0.3em;
- margin-left: -0.1em;
- .transition(all 0.3s @we_md-ease);
- .box-shadow(@we_box-shadow);
- }
- }
- .switch_input {
- position: absolute;
- width: 0;
- height: 0;
- margin: 0;
- padding: 0;
- opacity: 0;
- -ms-appearance: none;
- -moz-appearance: none;
- -webkit-appearance: none;
- appearance: none;
- border: none;
- }
- &.checked {
- .switch_track {
- background-color: rgb(142, 224, 212);
- background-color: transparentize(@we_color-accent, 0.5);
- &:after {
- background-color: @we_color-accent;
- margin-left: 1.1em;
- }
- }
- }
- &:hover {
- .switch_track {
- &:after {
- background-color: mix(@we_color-accent, #fafafa);
- }
- }
- }
-}
-
-
-
-// TEXT INPUT
-// ==========================
-
-// <div class="text-input-group">
-// <input type="text" required="true"/>
-// <span class="highlight"></span>
-// <span class="bar"></span>
-// <label>Name</label>
-// </div>
-
-.text-input-group {
- position:relative;
- margin-bottom:45px;
-
- input{
- font-size:18px;
- padding:10px 10px 10px 5px;
- display:block;
- width:300px;
- border:none;
- border-bottom:1px solid #757575;
- }
- input:focus{ outline:none; }
-
- /* LABEL ======================================= */
- label{
- color:#999;
- font-size:18px;
- font-weight:normal;
- position:absolute;
- pointer-events:none;
- left:5px;
- top:10px;
- .transition(0.2s ease all)
- }
-
- /* active state */
- input:focus ~ label, input:valid ~ label{
- top:-20px;
- font-size:14px;
- color:#5264AE;
- }
-
- /* BOTTOM BARS ================================= */
- .bar { position:relative; display:block; width:300px; }
- .bar:before, .bar:after{
- content:'';
- height:2px;
- width:0;
- bottom:1px;
- position:absolute;
- background:#5264AE;
- .transition(0.2s ease all);
- }
- .bar:before {
- left:50%;
- }
- .bar:after {
- right:50%;
- }
-
- /* active state */
- input:focus ~ .bar:before, input:focus ~ .bar:after {
- width:50%;
- }
-
- /* HIGHLIGHTER ================================== */
- .highlight {
- position:absolute;
- height:60%;
- width:100px;
- top:25%;
- left:0;
- pointer-events:none;
- opacity:0.5;
- }
-
- /* active state */
- input:focus ~ .highlight {
- .animation(inputHighlighter 0.3s ease);
- }
-
-}
-
-
-// DRAG&DROP ANIMATIONS
-// ==========================
-
-.oe_snippet_body {
- .opacity(0);
- .animation(fadeInDownSmall 1s forwards);
-}
diff --git a/addons/web_editor/static/src/less/web_editor.interactions.less b/addons/web_editor/static/src/less/web_editor.interactions.less
deleted file mode 100644
index 20e70c6a095..00000000000
--- a/addons/web_editor/static/src/less/web_editor.interactions.less
+++ /dev/null
@@ -1,61 +0,0 @@
-// Transitions
-// ======================
-
-@we_md-ease: cubic-bezier(0.19, 1, 0.22, 1);
-
-// Animation
-// ======================
-
-@-webkit-keyframes fadeInDownSmall {
- 0% {
- opacity: 0;
- .translateY(-5px);
- }
- 100% {
- opacity: 1;
- .translateY(0);
- }
-}
-@keyframes fadeInDownSmall {
- 0% {
- opacity: 0;
- .translateY(-5px);
- }
- 100% {
- opacity: 1;
- .translateY(0);
- }
-}
-@-webkit-keyframes fadeInOut {
- 0% {
- opacity: 0;
- }
- 25% {
- opacity: 1;
- }
- 75% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
-}
-@keyframes fadeInOut {
- 0% {
- opacity: 0;
- }
- 25% {
- opacity: 1;
- }
- 75% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
-}
-
-@keyframes inputHighlighter {
- from { background: @we_color-accent; }
- to { width:0; background:transparent; }
-}
diff --git a/addons/web_editor/static/src/less/web_editor.less b/addons/web_editor/static/src/less/web_editor.less
deleted file mode 100644
index 760108b9e61..00000000000
--- a/addons/web_editor/static/src/less/web_editor.less
+++ /dev/null
@@ -1,63 +0,0 @@
-// Generate all margins for all sizes
-.o-margins-all(@factor: 1) {
- // Unfortunately, the margins sizes are not
- // mathematically related by a single function
- .o-margins(128, @factor);
- .o-margins(96, @factor);
- .o-margins(92, @factor);
- .o-margins(64, @factor);
- .o-margins(48, @factor);
- .o-margins(32, @factor);
- .o-margins(24, @factor);
- .o-margins(16, @factor);
- .o-margins(8, @factor);
- .o-margins(4, @factor);
- .o-margins(0, @factor);
-}
-
-// Generate all margins for one size, scalled by a
-// given factor (0 <= factor <= 1)
-.o-margins(@name, @factor: 1) {
- .o-margins-define(@name, @factor * @name);
-}
-
-// Generate all margins for one size, given
-// the name of the margin and intended size
-.o-margins-define(@name, @size: @name) {
- .mt@{name} {margin-top: ~"@{size}px"!important;}
- .mb@{name} {margin-bottom: ~"@{size}px"!important;}
- .ml@{name} {margin-left: ~"@{size}px"!important;}
- .mr@{name} {margin-right: ~"@{size}px"!important;}
-}
-
-// Generate all margins
-.o-margins-all();
-
-// It is possible to change the margins ratio for
-// small screen sizes using media queries, e.g.:
-// @media (max-width: 768px) {
-// .o-margins-all(0.75);
-// }
-
-// It is also possible to only redefine single margins
-// for small screen sizes using media queries, e.g.:
-// @media (max-width: 768px) {
-// .o-margins(64, 0.50);
-// .o-margins(48, 0.50);
-// }
-
-// It is also possible to directly redefine the size
-// of single margins instead of refering to a factor
-// for small screen sizes using media queries, e.g.:
-// @media (max-width: 768px) {
-// .o-margins-define(128, 48);
-// .o-margins-define(96, 48);
-// .o-margins-define(64, 48);
-// }
-
-a.o_underline {
- text-decoration: underline;
- &:hover {
- text-decoration: underline;
- }
-} \ No newline at end of file
diff --git a/addons/web_editor/static/src/less/web_editor.mixins.less b/addons/web_editor/static/src/less/web_editor.mixins.less
deleted file mode 100644
index 2c4c78b4703..00000000000
--- a/addons/web_editor/static/src/less/web_editor.mixins.less
+++ /dev/null
@@ -1,204 +0,0 @@
-// Button variants
-// ========================
-// Easily pump out default styles, as well as :hover, :focus, :active,
-// and disabled options for all buttons
-
-.button-variant(@color, @background, @border) {
- color: @color;
- background-color: @background;
- border-color: @border;
- &:focus,
- &.focus {
- color: @color;
- background-color: darken(@background, 10%);
- border-color: darken(@border, 25%);
- }
- &:hover {
- color: @color;
- background-color: darken(@background, 10%);
- border-color: darken(@border, 12%);
- }
- &:active,
- &.active,
- .open > &.dropdown-toggle {
- color: @color;
- background-color: darken(@background, 10%);
- border-color: darken(@border, 12%);
- &:hover,
- &:focus,
- &.focus {
- color: @color;
- background-color: darken(@background, 17%);
- border-color: darken(@border, 25%);
- }
- }
- &:active,
- &.active,
- .open > &.dropdown-toggle {
- background-image: none;
- }
- &.disabled,
- &[disabled],
- fieldset[disabled] & {
- &,
- &:hover,
- &:focus,
- &.focus,
- &:active,
- &.active {
- background-color: @background;
- border-color: @border;
- }
- }
- .badge {
- color: @background;
- background-color: @color;
- }
-}
-
-// Button sizes
-.button-size(@padding-vertical, @padding-horizontal, @font-size, @line-height, @border-radius) {
- padding: @padding-vertical @padding-horizontal;
- font-size: @font-size;
- line-height: @line-height;
- border-radius: @border-radius;
-}
-
-// Opacity
-.opacity(@opacity) {
- opacity: @opacity;
- // IE8 filter
- @opacity-ie: (@opacity * 100);
- filter: ~"alpha(opacity=@{opacity-ie})";
-}
-
-// Transitions
-.transition(@transition...) {
- -moz-transition: @transition;
- -o-transition: @transition;
- -webkit-transition: @transition;
- transition: @transition;
-}
-
-.transition-property(@property...) {
- -moz-transition-property: @property;
- -o-transition-property: @property;
- -webkit-transition-property: @property;
- transition-property: @property;
-}
-
-.transition-duration(@duration...) {
- -moz-transition-property: @duration;
- -o-transition-property: @duration;
- -webkit-transition-property: @duration;
- transition-property: @duration;
-}
-
-.transition-timing-function(@timing...) {
- -moz-transition-timing-function: @timing;
- -o-transition-timing-function: @timing;
- -webkit-transition-timing-function: @timing;
- transition-timing-function: @timing;
-}
-
-.transition-delay(@delay...) {
- -moz-transition-delay: @delay;
- -o-transition-delay: @delay;
- -webkit-transition-delay: @delay;
- transition-delay: @delay;
-}
-
-// ANIMATIONS
-// ===========================
-
-.animation(@str) {
- -webkit-animation: @str;
- -moz-animation: @str;
- -ms-animation: @str;
- -o-animation: @str;
- animation: @str;
-}
-
-
-// BACKGROUND GRADIENT
-// =======================
-
-.linear-gradient(@start-color: #555; @end-color: #333; @deg: 45deg) {
- background-repeat: repeat-x;
- background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
- background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
- background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
-}
-
-.box-shadow(@string) {
- -webkit-box-shadow: @string;
- -moz-box-shadow: @string;
- box-shadow: @string;
-}
-
-.border-radius(@radius: 5px) {
- -webkit-border-radius: @radius;
- -moz-border-radius: @radius;
- border-radius: @radius;
-}
-
-// TRANSFORM
-// ===================================
-.transform(@transforms) {
- -moz-transform: @transforms;
- -o-transform: @transforms;
- -ms-transform: @transforms;
- -webkit-transform: @transforms;
- transform: @transforms;
-}
-
-// rotate
-.rotate(@deg) {
- .transform(rotate(@deg));
-}
-
-// scale
-.scale(@scale) {
- .transform(scale(@scale));
-}
-
-// translate
-.translate(@x, @y) {
- .transform(translate(@x, @y));
-}
-
-// translate
-.translateY(@y) {
- .transform(translateY(@y));
-}
-
-// skew
-.skew(@x, @y) {
- .transform(skew(@xdeg, @ydeg));
-}
-
-// transform origin
-.transform-origin(@origin) {
- moz-transform-origin: @origin;
- -o-transform-origin: @origin;
- -ms-transform-origin: @origin;
- -webkit-transform-origin: @origin;
- transform-origin: @origin;
-}
-
-// HELPERS
-// ======================================
-
-.user-select(@str) {
- -moz-user-select: @str;
- -webkit-user-select: @str;
- -ms-user-select: @str;
- user-select: @str;
-}
-
-// Box sizing
-.box-sizing(@boxmodel) {
- -webkit-box-sizing: @boxmodel;
- -moz-box-sizing: @boxmodel;
- box-sizing: @boxmodel;
-}
diff --git a/addons/web_editor/static/src/less/web_editor.ui.components.less b/addons/web_editor/static/src/less/web_editor.ui.components.less
new file mode 100644
index 00000000000..6cf994e2f03
--- /dev/null
+++ b/addons/web_editor/static/src/less/web_editor.ui.components.less
@@ -0,0 +1,339 @@
+
+// INPUTS
+.o_switch {
+ .o-flex-display();
+ .o-align-items(center);
+ font-weight: normal;
+ height: 1.5em;
+ cursor: pointer;
+
+ > input {
+ display: none;
+
+ + span {
+ background: #bababa;
+ border-radius: 0.4em;
+ height: 1em;
+ width: 2.5em;
+ margin-right: 0.5em;
+ display: inline-block;
+ .transition(all 0.3s @o-we-md-ease);
+ &:after {
+ content: "";
+ background: #fafafa;
+ display: block;
+ width: 1.5em;
+ height: 1.5em;
+ border-radius: 100em;
+ margin-top: -0.3em;
+ margin-left: -0.1em;
+ .transition(all 0.3s @o-we-md-ease);
+ box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
+ }
+ }
+
+ &:checked + span {
+ background-color: rgb(142, 224, 212);
+ background-color: transparentize(@odoo-brand-optional, 0.5);
+ &:after {
+ background-color: @odoo-brand-optional;
+ margin-left: 1.1em;
+ }
+ }
+ }
+ &:hover > input + span:after {
+ background-color: mix(@odoo-brand-optional, #fafafa);
+ }
+}
+.text-input-group {
+ position: relative;
+ margin-bottom: 45px;
+
+ input {
+ font-size: 18px;
+ padding: 10px 10px 10px 5px;
+ display: block;
+ width: 300px;
+ border: none;
+ border-bottom: 1px solid #757575;
+ }
+ input:focus { outline: none; }
+
+ /* LABEL ======================================= */
+ label {
+ color: #999;
+ font-size: 18px;
+ font-weight: normal;
+ .o-position-absolute(@top: 10px, @left: 5px);
+ pointer-events: none;
+ .transition(0.2s ease all)
+ }
+
+ /* active state */
+ input:focus ~ label, input:valid ~ label {
+ top: -20px;
+ font-size: 14px;
+ color: #5264AE;
+ }
+
+ /* BOTTOM BARS ================================= */
+ .bar { position: relative; display: block; width: 300px; }
+ .bar:before, .bar:after {
+ content: '';
+ height: 2px;
+ width: 0;
+ bottom: 1px;
+ .o-position-absolute();
+ background: #5264AE;
+ .transition(0.2s ease all);
+ }
+ .bar:before {
+ left: 50%;
+ }
+ .bar:after {
+ right: 50%;
+ }
+
+ /* active state */
+ input:focus ~ .bar:before, input:focus ~ .bar:after {
+ width: 50%;
+ }
+
+ /* HIGHLIGHTER ================================== */
+ .highlight {
+ .o-position-absolute(@top: 25%, @left: 0);
+ height: 60%;
+ width: 100px;
+ pointer-events: none;
+ opacity: 0.5;
+ }
+
+ /* active state */
+ input:focus ~ .highlight {
+ .animation(inputHighlighter 0.3s ease);
+ }
+}
+
+// DRAG&DROP ANIMATIONS
+.oe_snippet_body {
+ opacity: 0;
+ .o-animation(fadeInDownSmall, 700ms, @fill-mode: forwards);
+}
+
+// MODALS
+body .modal {
+ // SELECT MEDIA
+ .o_select_media_dialog {
+ width: 80%;
+
+ .modal-body {
+ li.search {
+ float: right;
+
+ ul.pager {
+ margin: 0;
+ > li > a {
+ border-radius: 3px;
+ margin-left: 2px;
+ padding: 6px 14px;
+ }
+ }
+ .form-group {
+ position: relative;
+ margin: 0 10px 0 0;
+ > input {
+ padding-right: 30px;
+ }
+ > span {
+ .o-position-absolute(7px, 7px);
+ font-size: 1.3em;
+ }
+ }
+ }
+ .dropdown-toggle {
+ line-height: 0;
+ height: 34px;
+ }
+ .o_existing_attachment_cell {
+ @odoo-border-image: 1px;
+ .o_existing_attachment_remove {
+ .o-position-absolute(@odoo-border-image, 15px + @odoo-border-image);
+ padding: 3px 3px 12px 12px;
+ background-color: white;
+ border-bottom: 1px solid black;
+ border-left: 1px solid black;
+ border-radius: 0 0 0 100%;
+ opacity: 0.8;
+ }
+ .o_image {
+ border: @odoo-border-image solid transparent;
+ cursor: pointer;
+
+ &.o_webimage {
+ width: 100%;
+ height: auto;
+ }
+ }
+ &.o_selected .o_image {
+ border-color: @odoo-brand-primary;
+ box-shadow: 0px 0px 2px 2px @odoo-brand-secondary;
+ }
+ }
+ .font-icons-icons > span {
+ font-size: 30px;
+ margin: 5px;
+ padding: 3px;
+ cursor: pointer;
+
+ &.o_selected {
+ box-shadow: 0px 0px 2px 2px @odoo-brand-secondary;
+ }
+ }
+ }
+ }
+
+ // BACKGROUND IMAGE OPTIONS
+ .o_bg_img_opt_modal .o_bg_img_opt {
+ margin: 15px 0;
+
+ .help-control {
+ .o-position-absolute(15px, 15px);
+ }
+ .help {
+ margin: 15px 0;
+
+ .simulator {
+ position: relative;
+ float: left;
+ margin-right: 15px;
+ width: 120px;
+ height: 100px;
+ .bg {
+ .o-position-absolute(0, 0, 0, 0);
+ border: 1px dotted #888787;
+ background-image: url(/web/image);
+ background-position: center center;
+ .o-background-size(cover);
+ }
+ .el {
+ .o-position-absolute(10px, 0, 10px, 0);
+ border: 1px solid #222;
+ }
+ &.contain_bg {
+ .bg {
+ .o-position-absolute(0, 12px, 20px, 12px);
+ }
+ .el {
+ .o-position-absolute(0, 0, 20px, 0);
+ }
+ }
+ }
+ + * {
+ clear: left;
+ }
+ }
+
+ .o_bg_img_opt_cover_edition {
+ border-top: 1px solid black;
+ border-bottom: 1px solid white;
+ padding: 0px 25px 25px 25px;
+ .o-linear-gradient(-150deg, lighten(#2c2c36, 5%), darken(#2c2c36, 10%));
+ h6 {
+ color: white;
+ font-weight: bold;
+ }
+ .o_bg_img_opt_object {
+ width: 100%;
+ background: white;
+ min-height: 10px;
+ position: relative;
+ overflow: hidden;
+ box-shadow: 0 0 10px #000;
+ > img {
+ cursor: crosshair;
+ border-top: 1px solid #5A5A5A;
+ border-bottom: 1px solid #111;
+ }
+ &:hover .o_focus_point:before {
+ opacity: 0.5;
+ }
+ }
+ .o_bg_img_opt_ui_info {
+ .animation(fadeInOut 2s ease forwards);
+ .o-position-absolute(@bottom: 1px, @right: 0);
+ display: block;
+ padding: 3px 13px;
+ background-color: rgba(255, 255, 255, 0.8);
+ color: #333;
+ text-align: center;
+ font-weight: bold;
+ pointer-events: none;
+ span {
+ font-weight: normal;
+ }
+ .o_x {
+ margin-right: 10px
+ }
+ }
+ .grid {
+ .o-position-absolute(@top: 33.33%, @left: 0);
+ display: block;
+ width: 100%;
+ height: 1px;
+ background: fadeOut(lighten(@odoo-brand-optional, 30%), 50%);
+ pointer-events: none;
+ &.grid-2 {
+ top: 66.66%
+ }
+ &.grid-3 {
+ top: 0;
+ left: 33.33%;
+ width: 1px;
+ height: 100%
+ }
+ &.grid-4 {
+ top: 0;
+ left: 66.66%;
+ width: 1px;
+ height: 100%
+ }
+ }
+ .o_focus_point {
+ .o-position-absolute(@top: 0, @left: 0);
+ width: 30px;
+ height: 30px;
+ border: 2px solid white;
+ border-radius: 100%;
+ margin-top: -15px;
+ margin-left: -15px;
+ box-shadow: 0 0 1px #333;
+ pointer-events: none;
+ &.o_with_transition {
+ .o-transition(all, 0.2s);
+ }
+ &:before {
+ pointer-events: none;
+ content: "";
+ display: block;
+ width: 100px;
+ height: 100px;
+ margin-top: -37px;
+ margin-left: -37px;
+ border: 1px solid #EAEAEA;
+ background: rgba(247, 76, 76, 0);
+ border-radius: 100em;
+ opacity: 1;
+ box-shadow: 0 0 0 100em rgba(0, 0, 0, 0.33);
+ .o-transition(opacity, 0.2s);
+ }
+ }
+ }
+ }
+
+ &.web_editor-dialog {
+ li > label {
+ width: 96%;
+ margin: 4px 2% 0;
+ }
+ }
+}
diff --git a/addons/web_editor/static/src/less/web_editor.ui.less b/addons/web_editor/static/src/less/web_editor.ui.less
index 75410d27eb0..33edd55dc61 100644
--- a/addons/web_editor/static/src/less/web_editor.ui.less
+++ b/addons/web_editor/static/src/less/web_editor.ui.less
@@ -1,976 +1,937 @@
-
+// TOP BAR (EDIT)
#web_editor-top-edit {
- text-rendering: geometricPrecision;
- -webkit-font-smoothing: antialiased;
- background-color: @we_color-dark;
- height: @we_editor-bar-height;
- font-family: @we_font-default;
- min-height: initial;
- border: none;
-
- form.navbar-form {
- margin: 0;
- padding: 0;
- border: none;
- text-align: right;
- position: absolute;
- height: @we_editor-bar-height;
- right: -@we_sidebar-width;
- .transition(right 0.4s @we_md-ease);
- .full {
- margin-top: 0;
- margin-bottom: 0;
- border-radius: 0;
- padding: 0 15px;
- height: @we_editor-bar-height;
- &.accent {
- .button-variant(white, @we_color-accent, @we_color-accent)
- }
- &.compl {
- .button-variant(white, @we_color-primary, @we_color-primary)
- }
- }
- a, button {
- font-weight: 600;
- font-size: 11px;
- }
- .btn-group {
- button {
- height: @we_editor-bar-height;
- padding: 0 10px 0 10px;
- line-height: 1;
- border-radius: 0;
+ .o-position-absolute(0, 0, auto, 0);
+ position: fixed;
+ height: @odoo-navbar-height;
+ z-index: 1003;
+
+ background-color: rgba(0,0,0,0);
+ .o-transition(background-color, 400ms, @o-we-md-ease);
+ font-family: Roboto, @font-family-sans-serif;
+
+ form.navbar-form {
+ height: 100%;
margin: 0;
- border: none;
- .button-variant(white, @we_color-primary, @we_color-primary);
- }
- }
- }
-}
+ padding: 0;
+ .o-position-absolute(@right: -@o-we-sidebar-width);
+ .o-transition(right, 0.4s, @o-we-md-ease);
-#web_editor_snippets {
- text-rendering: geometricPrecision;
- -webkit-font-smoothing: antialiased;
- bottom: 0;
- width: @we_sidebar-width;
- left: -@we_sidebar-width;
- top: 0;
- z-index: 1030;
- font-family: @we_font-default;
- position: fixed;
- .transition(left 0.4s @we_md-ease);
- #o_left_bar {
- top: @we_editor-bar-height;
- width: @we_sidebar-width;
- left: 0px;
- bottom: 0;
- .linear-gradient(@we_color-normal, darken(@we_color-normal, 10%));
- .box-shadow(0px 10px 10px -10px black inset);
- }
-}
+ .btn-group {
+ height: 100%;
+ }
-#snippets_menu {
- border: 1px solid @we_color-divider;
- border-width: 0 1px 1px 0;
- background: @we_color-dark;
- height: @we_editor-bar-height + 1;
- text-align: center;
- margin: 0;
- padding: 7px 0;
- list-style-type: none;
- li {
- display: inline-block;
- padding: 0 9px;
- font-size: 0;
- a i {
- color: #999999;
- &:hover{ color: white; }
- }
- &.structure a i{
- font-size: 25px;
- .translateY(3px);
- }
- &.content a i{
- font-size: 19px;
- }
- &.feature a i{
- font-size: 19px;
- }
- &.effect a i{
- font-size: 16px;
- .translateY(-3px);
+ .btn {
+ height: 100%;
+ margin: 0;
+ padding: 10px;
+ line-height: 1;
+ font-weight: bold;
+
+ .o-transition(all, 0.3s);
+ border: none;
+ border-radius: 0;
+
+ &.btn-primary {
+ .button-variant(white, @odoo-brand-primary, @odoo-brand-primary);
+ text-transform: uppercase;
+ }
+ &.btn-default {
+ .button-variant(white, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
+ text-transform: uppercase;
+ }
+
+ &:focus, &:active, &:focus:active {
+ outline: none;
+ }
+ }
+ .dropdown-menu {
+ left: auto;
+ right: 0;
+ }
}
- }
- li.active a {
- color: white;
- }
}
+// SNIPPET PANEL
+#oe_snippets {
+ .o-flex-display();
+ .o-flex-flow(column, nowrap);
+ .o-position-absolute(0, auto, 0, -@o-we-sidebar-width);
+ position: fixed;
+ width: @o-we-sidebar-width;
+ z-index: 1003;
-#o_scroll {
- .o_panel {
- margin: 0;
- border: 0;
- width: 210px;
- }
- .o_panel_header {
- padding: 1px 8px;
- color: #999999;
- text-align: center;
- }
- .o_panel_body {
- white-space: normal;
- background: transparent;
- padding: 7px 3px;
- }
-}
+ font-family: Roboto, @font-family-sans-serif;
+ border-right: 1px solid @o-we-color-divider;
+ .o-transition(left, 400ms, @o-we-md-ease);
+ .o-linear-gradient(45deg, @o-we-color-normal, darken(@o-we-color-normal, 10%));
+ box-shadow: 0px 10px 10px -10px black inset;
-.oe_snippet {
- display: inline-block;
- vertical-align: top;
- width: 93px;
- margin-left: 3px;
- margin-right: 3px;
- margin-top: 1px;
- position: relative;
- overflow: hidden;
- .user-select(none);
- cursor: move;
- cursor: copy;
- color: @we_color-text-normal;
- font-weight: 600;
- margin-bottom: 0.5em;
- .oe_snippet_thumbnail {
- text-align: center;
- height: 100%;
- background: transparent;
- position: relative;
- .oe_snippet_thumbnail_img {
- height: 74px;
- width: 92px;
- background-size: cover;
- opacity: 0.9;
- }
- .oe_snippet_thumbnail_title {
- font-size: 12px;
- display: block;
- text-shadow: none;
- color: @we_color-text-normal;
- }
- &:hover {
- .oe_snippet_thumbnail_img {
- opacity: 1;
- .scale(1);
- }
- .oe_snippet_thumbnail_title {
- color: white;
- }
- }
- }
- > :not(.oe_snippet_thumbnail) {
- display: none !important;
- }
- &.disable {
- .oe_snippet_thumbnail {
- background-color: rgba(255, 0, 0, 0.75);
- }
- .oe_snippet_thumbnail_img {
- opacity: 0.8;
+ #snippets_menu {
+ .o-flex(0, 0, auto);
+ height: @odoo-navbar-height;
+ margin: 0;
+ padding: 0;
+ background: @o-we-color-dark;
+ list-style-type: none;
+ li {
+ display: block;
+ float: left;
+ width: 25%;
+ height: 100%;
+
+ a {
+ display: block;
+ width: 100%;
+ height: 100%;
+ .o-flex-display();
+ .o-align-items(center);
+ .o-justify-content(center);
+ text-decoration: none!important;
+
+ i {
+ font-size: 20px;
+ color: #999999;
+ + i {
+ color: white;
+ }
+ }
+ }
+
+ &.active, &:hover {
+ a i {
+ color: white;
+ + i {
+ color: @odoo-brand-primary;
+ }
+ }
+ }
+ }
}
- }
-}
-
-.oe_drop_zone.oe_insert{
- display: block;
- height: 48px;
- margin: 0px;
- margin-top: -4px;
- margin-bottom: -44px;
- width: 100%;
- position: absolute;
- z-index: 1000;
- .transition(margin 250ms linear);
- &:not(.oe_vertical):before{
- content: "";
- display: block;
- border-top: dashed 2px rgba(209, 178, 255, 0.72);
- position: relative;
- top: 0px}
- &.oe_hover:before{
- border-top: dashed 2px rgba(116, 255, 161, 0.72)}
- &.oe_vertical{
- width: 48px;
- float: left;
- position: relative;
- margin: 0px -24px !important}
- &.oe_vertical_text{
- width: 48px;
- float: none;
- display: inline-block;
- position: relative;
- margin: 0px -24px !important}
- &.oe_overlay{
- .border-radius(3px);
- background: rgba(153, 0, 255,.5)}
-}
-.oe_drop_zone, .oe_drop_zone_style{
- border: none;
- background: rgba(153, 0, 255, .3);
- .border-radius(4px);
- &.oe_hover{
- background: rgba(0, 255, 133, .3);
- z-index: 1001}
-}
-.oe_drop_zone_style{
- color: white;
- height: 48px;
- margin-bottom: 32px;
- padding-top: 12px
-}
+ #o_scroll {
+ height: 100%;
+ overflow: auto;
+ .o_panel_header {
+ color: #999999;
+ .o-flex-display();
+ .o-align-items(center);
+ .o-justify-content(center);
+ padding: 3%;
+ i {
+ margin-right: 5px;
+ }
+ }
+ .o_panel_body {
+ &:after {
+ content: " ";
+ display: table;
+ clear: both;
+ }
+
+ .oe_snippet {
+ float: left;
+ width: 45.5%;
+ margin: 0 0 3% 3%;
+ box-shadow: none;
+ background-color: transparent;
+ .user-select(none);
+
+ cursor: pointer;
+ cursor: copy;
+ cursor: grab;
+
+ .oe_snippet_thumbnail {
+ .oe_snippet_thumbnail_img {
+ border: none;
+ }
+ .oe_snippet_thumbnail_title {
+ border: none;
+ padding: 0px;
+ }
+
+ &:hover .oe_snippet_thumbnail_img {
+ .o-transition(transform, 200ms, ease);
+ .scale(1.05);
+ }
+ }
+
+ &.disable {
+ .oe_snippet_thumbnail {
+ background-color: rgba(255, 0, 0, 0.75);
+ }
+ .oe_snippet_thumbnail_img {
+ opacity: 0.8;
+ }
+ }
+ }
+ }
+ }
+}
+.oe_snippet { // No root because can be drag and drop (and the helper is in the body)
+ position: relative;
+ width: 100px;
+ background-color: @o-we-color-normal;
+ > :not(.oe_snippet_thumbnail) {
+ display: none!important;
+ }
-/* ---- SNIPPET MANIPULATOR ---- {{{ */
+ .oe_snippet_thumbnail {
+ width: 100%;
-#oe_manipulators {
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
+ .oe_snippet_thumbnail_img {
+ width: 100%;
+ height: 0;
+ border: 1px solid @o-we-color-normal;
+ padding-bottom: 75%;
+ background-size: cover;
+ background-position: center center;
+ text-align: center;
+ overflow: hidden;
+ }
+ img.oe_snippet_thumbnail_img {
+ height: auto;
+ padding-bottom: 0;
+ }
+ .oe_snippet_thumbnail_title {
+ display: block;
+ border: 1px solid @o-we-color-normal;
+ padding: 5px;
+ font-size: 12px;
+ font-weight: 600;
+ text-shadow: none;
+ color: @o-we-color-text-normal;
+ }
+ &:hover .oe_snippet_thumbnail_title {
+ color: white;
+ }
+ }
}
-.oe_overlay {
- display:none;
- height:0;
- position:absolute;
- background:transparent;
- z-index:1001;
- border-radius:3px;
- .transition(opacity 100ms linear);
- .box-sizing(border-box);
- &.o_keypress {
- .transition(0.8s);
- }
+// DROPZONES
+@-webkit-keyframes dropZoneInsert {
+ to {
+ background-color: fade(@odoo-brand-primary, 20%);
+ }
}
-
-
-/* ---- HANDLES ---- {{{ */
-
-.oe_handle {
- display:block;
- width:16px;
- height:16px;
- margin:-2px;
- .o-position-absolute(50%, auto, auto, 50%);
- .box-sizing(border-box);
- .opacity(0.6);
- .transition(opacity 0.3s ease);
- &:hover {
- .opacity(0.9);
- }
- // Orizontal lines
- > div {
- z-index:1;
- position:absolute;
- border-style:dashed;
- border-width:1px;
- border-color:#666666;
- .box-shadow(inset 0px 0px 0px 1px rgba(255,255,255,0.5) 0px 0px 0px 1px rgba(255,255,255,0.5));
- }
- // Vertical lines
- &.e > div, &.w > div {
- width:0;
- height:100%;
- top:2px;
- left:8px;
- }
- &.readonly {
- cursor:auto !important;
- }
- &.readonly:before, &.readonly.size {
- display:none !important;
- }
+@keyframes dropZoneInsert {
+ to {
+ background-color: fade(@odoo-brand-primary, 20%);
+ }
}
+#wrapwrap .oe_drop_zone {
+ background-color: fade(@odoo-brand-primary, 5%);
+ .o-animation(dropZoneInsert, 1s, linear, 0s, infinite, alternate);
-.oe_handle.e, .oe_handle.w, .oe_handle.s, .oe_handle.n {
- &:before {
- z-index:2;
- position:relative;
- top:50%;
- left:50%;
- display:block;
- border:solid 1px rgba(0,0,0,0.2);
- width:18px;
- height:18px;
- margin:-9px;
- font-size:14px;
- line-height:16px;
- font-family:FontAwesome;
- content:"";
- text-align:center;
- padding:1px;
- border-radius: 3px;
- background-color: @we_color-light;
- color: @we_color-text-light;
- .transition(background 100ms linear);
- }
- &:hover:before{
- background-color: @we_color-dark;
- color:#ffffff;
- .box-shadow(0 0 5px 3px rgba(255,255,255,0.7));
- }
-}
+ &.oe_insert {
+ @odoo-dropzone-size: 40px;
+ @odoo-dropzone-border-width: 2px;
+ @odoo-dropzone-border: @odoo-dropzone-border-width dashed @odoo-brand-primary;
-// SPECIFIC HANDLERS POSITION
-// ===========================
+ z-index: 999;
-.oe_handle.e {
- top:4px;
- height:100%;
- left:auto;
- right:-6px;
- cursor:w-resize;
-}
-.oe_handle.w {
- top:4px;
- height:100%;
- left:-6px;
- cursor:e-resize;
-}
-.oe_handle.s {
- left:2px;
- width:100%;
- top:auto;
- cursor:n-resize;
- > div {
- width:100%;
- height:0;
- top:7px;
- left:1px;
- }
-}
-.oe_handle.n {
- left:2px;
- width:100%;
- cursor:s-resize;
- > div {
- width:100%;
- height:0;
- top:5px;
- left:1px;
- }
-}
+ border: @odoo-dropzone-border;
+ border-top: none;
+ border-bottom: none;
-// SIZE HANDLERS
-// ===========================
-
-.oe_handle.size {
- z-index: 3;
- margin-left: -50px;
- .auto_size, .size {
- font-weight: 600;
- font-size: 9px;
- line-height: 9px;
- text-transform: uppercase;
- line-height: 9px;
- padding: 4px;
- border-radius: 3px;
- border: none;
- height: 18px;
- text-align: center;
- margin-top: -10px;
- background-color: @we_color-light;
- color: @we_color-text-light;
- .o-position-absolute(9px);
- .box-shadow(none);
- &:hover {
- background-color: @we_color-dark;
- color: white;
+ position: relative;
+ width: 100%;
+ height: @odoo-dropzone-size;
+ margin: -@odoo-dropzone-size/2 0;
+
+ .o-transition(margin, 400ms, linear);
+
+ &:after {
+ content: "";
+ display: block;
+ width: 100%;
+ height: 50%;
+ border-bottom: @odoo-dropzone-border;
+ box-sizing: content-box;
+ }
+
+ &.oe_vertical {
+ border: 2px dashed @odoo-brand-primary;
+ border-left: none;
+ border-right: none;
+
+ width: @odoo-dropzone-size;
+ float: left;
+ margin: 0 -@odoo-dropzone-size/2;
+
+ &:after {
+ width: 50%;
+ height: 100%;
+ border-bottom: none;
+ border-right: @odoo-dropzone-border;
+ }
+ }
}
- }
- .size {
- width:64px;
- cursor:row-resize;
- margin-left:52px;
- margin-left: 60px;
- }
- .auto_size {
- margin-left: -63px;
- width:100px;
- cursor:pointer;
- .transition(all 1s ease);
- }
}
+// MANIPULATORS
+#oe_manipulators {
+ @odoo-handle-edge-size: 8px;
+ @odoo-handle-border-width: 3px;
+
+ // SNIPPET MANIPULATORS
+ .oe_overlay {
+ .o-position-absolute();
+ z-index: 1002;
+ display: none;
+ height: 0;
+ background: transparent;
+ text-align: center;
+ .o-transition(opacity, 400ms, linear);
+ &.o_keypress {
+ opacity: 0;
+ }
+ &.oe_active {
+ display: block;
+ }
-// HANDLERS ICONS
-// ===========================
+ // OVERLAY OPTIONS
+ > .oe_overlay_options {
+ .o-position-absolute(@bottom: 0, @left: 0);
+
+ > .btn-group {
+ white-space: nowrap;
+
+ .btn {
+ @o-overlay-option-size: 25px;
+
+ display: inline-block;
+ width: @o-overlay-option-size;
+ height: @o-overlay-option-size;
+ padding: 0;
+ border: 1px solid @o-we-color-dark;
+ line-height: @o-overlay-option-size;
+ font-size: 11px;
+ border-radius: 0;
+ font-weight: 600;
+
+ .o-transition(all, 400ms);
+ color: @o-we-color-text-light;
+ background-color: @o-we-color-light;
+ &:hover {
+ color: white;
+ background-color: lighten(@o-we-color-dark, 10%);
+ }
+
+ &.oe_snippet_remove {
+ color: white;
+ background-color: @o-we-color-danger;
+ border-color: darken(@o-we-color-danger, 20%);
+ &:hover {
+ background-color: darken(@o-we-color-danger, 20%);
+ }
+ }
+ }
+
+ // CUSTOMIZE MENU BUTTON
+ > .oe_options {
+ .btn {
+ width: auto;
+ padding: 0 25px 0 5px;
+ background-color: @o-we-color-dark;
+ text-transform: uppercase;
+ &:hover, &:active, &:focus {
+ background-color: lighten(@o-we-color-dark, 5%);
+ border-color: lighten(@o-we-color-dark, 10%);
+ color: white;
+ }
+ &:active, &:focus, &:active:focus {
+ outline: none;
+ }
+ &:before, &:after {
+ content: "";
+ width: 7px;
+ height: 2px;
+ background-color: @o-we-color-text-light;
+ .o-position-absolute(46%);
+ .o-transition(all, 0.3s);
+ }
+ &:before {
+ right: 9px;
+ .rotate(45deg);
+ }
+ &:after {
+ right: 5px;
+ .rotate(-45deg);
+ }
+ }
+ // Open menu
+ &.open .btn {
+ background-color: @o-we-color-light;
+ &:before, &:after {
+ width: 9px;
+ }
+ &:before {
+ right: 10px;
+ transform: translateX(5px) rotate(-45deg);
+ }
+ &:after {
+ .rotate(45deg);
+ }
+ }
+
+ // CUSTOMIZE MENU
+ .dropdown-menu {
+ margin: -1px 0 0 0;
+ padding: 0;
+ border: 1px solid @o-we-color-dark;
+ border-radius: 0;
+ background-color: @o-we-color-light;
+ a {
+ color: @o-we-color-text-light;
+ font-weight: 600;
+ font-size: 12px;
+ padding: 5px 20px;
+ }
+
+ > li {
+ position: relative;
+ &:hover {
+ background-color: fadeOut(@o-we-color-dark, 50%);
+ > a {
+ color: white;
+ background: transparent;
+ cursor: pointer;
+ }
+ > .dropdown-menu {
+ display: block;
+ left: 100%;
+ top: 0;
+ }
+ }
+ &.dropdown-submenu:before {
+ .o-position-absolute(@top: 10px, @right: 10px);
+ .o-caret-right(3px);
+ border-left-color: @o-we-color-text-light;
+ }
+ &.divider {
+ background-color: @o-we-color-divider;
+ margin: 0;
+ }
+ &.active > a {
+ color: white;
+ background-color: fadeOut(@o-we-color-dark, 50%);
+ &:before {
+ .o-position-absolute(@top: 5px, @left: 5px);
+ content: "\f00c";
+ font-family: "FontAwesome";
+ color: @odoo-brand-optional;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
-.oe_overlay{
- .w:before, .e:before {
- content:"\f07e";
- }
- .s:before, .n:before {
- content:"\f07d";
- }
-}
+ &.o_top_cover > .oe_overlay_options {
+ bottom: auto;
+ top: @odoo-handle-border-width;
+ right: @odoo-handle-border-width;
+ }
-.oe_overlay.oe_active {
- display:block;
-}
+ // HANDLES
+ > .oe_handles {
+ @o-handles-offset-to-hide: 10000px;
+ .o-position-absolute(-@o-handles-offset-to-hide, 0, auto, 0);
+
+ > .oe_handle {
+ @o-handle-size: 18px;
+
+ opacity: 0.5;
+ .o-transition(opacity, 400ms);
+ &:hover {
+ opacity: 0.9;
+ }
+ border: 0 dashed black;
+
+ &:after {
+ display: block;
+ width: @o-handle-size;
+ height: @o-handle-size;
+ border: solid 1px rgba(0, 0, 0, 0.2);
+ line-height: @o-handle-size - 2;
+ font-size: 14px;
+ font-family: FontAwesome;
+ background-color: @o-we-color-light;
+ color: @o-we-color-text-light;
+ }
+ &:hover:after {
+ background-color: @o-we-color-dark;
+ color: white;
+ box-shadow: 0 0 5px 3px rgba(255,255,255,0.7);
+ }
+ &.w:after, &.e:after {
+ content: "\f07e";
+ }
+ &.s:after, &.n:after {
+ content: "\f07d";
+ }
+
+ &.w {
+ border-left-width: @odoo-handle-border-width;
+ cursor: e-resize;
+ width: @odoo-handle-edge-size;
+ .o-position-absolute(@o-handles-offset-to-hide, auto, -@o-handles-offset-to-hide, 0);
+
+ &:after {
+ .o-position-absolute(@top: 50%, @left: -@odoo-handle-border-width);
+ margin-top: -@o-handle-size/2;
+ }
+ }
+ &.e {
+ border-right-width: @odoo-handle-border-width;
+ cursor: w-resize;
+ width: @odoo-handle-edge-size;
+ .o-position-absolute(@o-handles-offset-to-hide, 0, -@o-handles-offset-to-hide, auto);
+
+ &:after {
+ .o-position-absolute(@top: 50%, @right: -@odoo-handle-border-width);
+ margin-top: -@o-handle-size/2;
+ }
+ }
+ &.n {
+ border-top-width: @odoo-handle-border-width;
+ cursor: s-resize;
+ height: @odoo-handle-edge-size;
+ .o-position-absolute(@o-handles-offset-to-hide, 0, auto, 0);
+
+ &:after {
+ .o-position-absolute(@left: 50%, @top: -@odoo-handle-border-width);
+ margin-left: -@o-handle-size/2;
+ }
+ }
+ &.s {
+ border-bottom-width: @odoo-handle-border-width;
+ cursor: n-resize;
+ height: @odoo-handle-edge-size;
+ .o-position-absolute(auto, 0, -@o-handles-offset-to-hide, 0);
+
+ &:after {
+ .o-position-absolute(@left: 50%, @bottom: -@odoo-handle-border-width);
+ margin-left: -@o-handle-size/2;
+ }
+ }
+
+ // SIZE HANDLERS
+ &.size {
+ @o-handle-size-height: 15px;
+
+ height: 0;
+ background: transparent;
+ .o-position-absolute(@bottom: -@o-handles-offset-to-hide + @o-handle-size-height, @left: 50%);
+ width: 250px;
+ margin-left: -125px;
+
+ > .oe_handle_button {
+ display: block;
+ width: 100px;
+ height: @o-handle-size-height;
+ padding-top: 2px;
+ font-weight: 600;
+ font-size: 9px;
+ text-transform: uppercase;
+ background-color: @o-we-color-light;
+ color: @o-we-color-text-light;
+ &:hover {
+ background-color: @o-we-color-dark;
+ color: white;
+ }
+ &.auto_size {
+ cursor: pointer;
+ float: left;
+ }
+ &.size {
+ cursor: row-resize;
+ float: right;
+ }
+ }
+ }
+
+ &.readonly {
+ cursor: auto !important;
+
+ &:after, &.size {
+ display: none !important;
+ }
+ &:hover {
+ opacity: 0.5;
+ }
+ }
+ }
+ }
-.oe_overlay.block-w-left .w:before {
- content:"" !important;
-}
-.oe_overlay.block-w-right .w:before {
- content:"" !important;
-}
-.oe_overlay.block-w-left.block-w-right .w:before {
- display:none !important;
-}
-.oe_overlay.block-e-left .e:before {
- content:"" !important;
-}
-.oe_overlay.block-e-right .e:before {
- content:"" !important;
-}
-.oe_overlay.block-e-left.block-e-right .e:before {
- display:none !important;
-}
-.oe_overlay.block-s-top .s:before {
- content:"" !important;
-}
-.oe_overlay.block-s-bottom .s:before {
- content:"" !important;
-}
-.oe_overlay.block-n-top .n:before {
- content:"" !important;
-}
-.oe_overlay.block-n-bottom .n:before {
- content:"" !important;
+ // HANDLERS ICONS
+ &.block-w-left .w:after {
+ content: "" !important;
+ }
+ &.block-w-right .w:after {
+ content: "" !important;
+ }
+ &.block-w-left.block-w-right .w:after {
+ display: none !important;
+ }
+ &.block-e-left .e:after {
+ content: "" !important;
+ }
+ &.block-e-right .e:after {
+ content: "" !important;
+ }
+ &.block-e-left.block-e-right .e:after {
+ display: none !important;
+ }
+ &.block-s-top .s:after {
+ content: "" !important;
+ }
+ &.block-s-bottom .s:after {
+ content: "" !important;
+ }
+ &.block-n-top .n:after {
+ content: "" !important;
+ }
+ &.block-n-bottom .n:after {
+ content: "" !important;
+ }
+ }
}
-.s-resize-important {
- & * {
- cursor:s-resize !important;
- }
-}
-.n-resize-important {
- & * {
- cursor:n-resize !important;
- }
-}
-.e-resize-important {
- & * {
- cursor:e-resize !important;
- }
+.s-resize-important * {
+ cursor: s-resize !important;
}
-.w-resize-important {
- & * {
- cursor:w-resize !important;
- }
+.n-resize-important * {
+ cursor: n-resize !important;
}
-.move-important {
- & * {
- cursor:move !important;
- }
+.e-resize-important * {
+ cursor: e-resize !important;
}
-
-.block-s-top .s:before,
-.block-s-bottom .s:before,
-.block-n-top .n:before,
-.block-n-bottom .n:before,
-.block-w-left .w:before,
-.block-e-right .e:before {
- font-size: 10px;
+.w-resize-important * {
+ cursor: w-resize !important;
}
-
-
-
-
-// OVERLAY OPTIONS
-// ===========================
-
-.oe_overlay_options {
- text-align:center;
- margin-top: -17px;
- z-index:1002;
- .o-position-absolute(-20px, auto, auto, 50%);
- > .btn-group {
- left:-50%;
- white-space:nowrap;
- // default buttons (not customize)
- > a.btn {
- cursor:pointer;
- display:inline-block;
- background-color: @we_color-light;
- color: @we_color-text-light;
- border: 1px solid lighten(@we_color-dark, 10%);
- border-left-width: 0;
- border-radius: 0;
- margin: 0;
- float: left;
- font-weight: 600;
- .transition(all 0.4s ease);
- &:first-child {
- border-left-width: 1px;
- }
- &:hover {
- color: white;
- background-color: lighten(@we_color-dark, 10%);
- }
- &.oe_snippet_remove {
- color: white;
- background-color: @we_color-danger;
- border-color: darken(@we_color-danger, 20%);
- &:hover{
- background-color: darken(@we_color-danger, 20%);
- }
- }
- }
- }
+.move-important * {
+ cursor: move !important;
}
-// CUTOMIZE MENU BUTTON
-// ===========================
-
-.oe_options{
- float: left;
- display:inline-block;
- .btn.btn-primary {
- background-color: @we_color-dark;
- border: 1px solid @we_color-dark;
- color: @we_color-text-light;
- width: 110px;
- font-weight: bold;
- text-align: left;
- text-transform: uppercase;
- font-size: 10px;
- line-height: 18px;
- .transition(all 0.3s ease);
- &:hover, &:active, &:focus {
- background-color: lighten(@we_color-dark, 5%);
- border-color: lighten(@we_color-dark, 10%);
- color: white;
- outline: none;
- .transition(all 0.3s ease);
- }
- &:before, &:after {
- content: "";
- background-color: @we_color-text-light;
- border-radius: 5px;
- margin-top: -1px;
- height: 2px;
- width: 7px;
- .o-position-absolute(50%);
- .transition(all 0.3s);
- }
+.block-s-top .s,
+.block-s-bottom .s,
+.block-n-top .n,
+.block-n-bottom .n,
+.block-w-left .w,
+.block-e-right .e {
&:before {
- right: 21px;
- .rotate(45deg);
- }
- &:after {
- right: 17px;
- .rotate(-45deg);
+ font-size: 10px;
}
- }
- // Open menu
- &.open .btn.btn-primary {
- background-color: @we_color-light;
- &:before {
- right: 22px;
- width: 9px;
- transform: translateX(5px) rotate(-45deg);
- background-color: white;
- }
- &:after {
- width: 9px;
- background-color: white;
- .rotate(45deg);
- }
- }
}
-// CUTOMIZE MENU
-// ===========================
-.oe_options {
- .dropdown-menu {
- text-align:left;
- background-color: @we_color-light;
- min-width: 192px;
- .border-radius(0);
- margin: -1px 0 0 0;
+// NOTE EDITOR
+.note-popover .popover {
+ height: @odoo-navbar-height;
+ top: 0 !important;
+ left: 0 !important;
padding: 0;
- border-color: @we_color-light;
- border: 1px solid @we_color-dark;
- select, input {
- display:block;
- }
- a {
- color: @we_color-text-light;
- font-weight: 600;
- font-size: 12px;
- padding: 5px 20px;
- }
- }
-}
+ margin: 0 0 0 @o-we-sidebar-width;
+ background-color: @o-we-color-dark;
+ border-radius: 0;
+ border-width: 0 1px;
+ width: auto;
+ text-align: center;
+ box-shadow: none;
+ .popover-content {
+ height: @odoo-navbar-height;
+ .btn {
+ height: @odoo-navbar-height;
+ border: none;
+ border-radius: 0;
+ background-color: @o-we-color-dark;
+ color: @o-we-color-text-normal;
+ border-top: 2px solid transparent;
+ .o-transition(all, 0.3s);
+ &:hover {
+ border-top: 2px solid @o-we-color-text-normal;
+ color: @o-we-color-text-normal;
+ }
+ }
+ .btn.active {
+ border-top: 2px solid white;
+ background-color: @o-we-color-dark;
+ color: @o-we-color-text-light;
+ box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.5);
+ }
+ >.btn-group {
+ margin-top: -2px
+ }
+ .btn-group.open .dropdown-toggle {
+ border-top: 2px solid white;
+ background-color: @o-we-color-darker;
+ color: white;
+ box-shadow: none;
+ }
+ .dropdown-menu {
+ margin: 0;
+ border-radius: 0;
+ background-color: @o-we-color-darker;
+ > li > a {
+ width: 100%;
+ color: @o-we-color-text-light;
+ &:hover {
+ background-color: @o-we-tab-active-bg;
+ color: white;
+ }
+
+ > i {
+ visibility: hidden;
+ }
+ &.checked > i {
+ visibility: visible;
+ }
+ }
+ }
+ #colors_preview {
+ padding: 4px;
+ border-radius: 2px;
+ border: 1px solid #989898;
+ border-color: fadeOut(@o-we-color-text-normal, 0.5);
+ }
+ .note-color-palette td > button, .note-color-palette div .note-color-btn {
+ border-color: fadeOut(white, 50%);
+ border-radius: 0;
+ margin: 1px;
+ }
-// CUTOMIZE MENU LI
-// ===========================
-
-.oe_options .dropdown-menu li {
- background-color: @we_color-light;
- position: relative;
- a {
- cursor: pointer;
- background-color: transparent;
- }
- &:last-child a {
- padding-bottom: 8px;
- }
- &:hover {
- background-color: fadeOut(@we_color-dark, 50%);
- &.dropdown-submenu:after{
- border-left-color: white;
- }
- > a {
- color: white;
- background: transparent;
- }
- > .dropdown-menu{
- display: block;
- left: 100%;
- top: 1px;
- }
- }
- &.dropdown-submenu:after{
- content: "";
- .o-position-absolute(10px, 10px);
- .o-caret-right(3px);
- border-left-color: @we_color-text-light;
- }
- &.divider {
- background-color: @we_color-divider;
- margin: -1px 0;
- }
- &.active {
- > a {
- color: white;
- background-color: fadeOut(@we_color-dark, 50%);
- &:after {
- content: "\E876";
- font-family: "Material Icons";
- float: right;
- color: @we_color-accent;
- }
+ // COLORPICKER
+ .note-color {
+ .dropdown-toggle {
+ width: auto;
+ }
+ .o_foreground_toggle > button:before {
+ font-family: FontAwesome;
+ content: '\f1fc';
+ }
+ .o_background_toggle > button:before {
+ font-family: FontAwesome;
+ content: '\f0c3';
+ }
+
+ border: 1px solid @o-we-color-divider;
+ border-width: 0 1px;
+ .dropdown-menu {
+ min-width: 250px!important;
+ padding: 0!important;
+ }
+ }
}
- }
}
-
-
-// NOTE EDITOR
-// =========================
-
-.note-popover .popover {
- height: @we_editor-bar-height;
- top: 0 !important;
- left: 0 !important;
- padding: 0;
- margin: 0 0 0 @we_sidebar-width;
- background-color: @we_color-dark;
- border-radius: 0;
- border-width: 0 1px;
- width: auto;
- text-align: center;
- .box-shadow(none);
- .popover-content {
- height: @we_editor-bar-height;
- .btn {
- height: @we_editor-bar-height;
- border: none;
- border-radius: 0;
- background-color: @we_color-dark;
- color: @we_color-text-normal;
- border-top: 2px solid transparent;
- .transition(all 0.3s);
- &:hover {
- border-top: 2px solid @we_color-text-normal;
- color: @we_color-text-normal;
- }
- }
- .btn.active {
- border-top: 2px solid white;
- background-color: @we_color-dark;
- color: @we_color-text-light;
- .box-shadow(inset 0 3px 10px rgba(0, 0, 0, 0.5));
- }
- >.btn-group {
- margin-top: -2px
- }
- .btn-group.open .dropdown-toggle {
- border-top: 2px solid white;
- background-color: @we_color-darker;
- color: white;
- .box-shadow(none);
- }
- .dropdown-menu {
- margin: 11px 0 0;
- border: 0;
- border-top: 7px solid darken(@we_color-accent,10%);
- background-color: @we_color-darker;
- border-radius: 2px 2px 0 0;
- &:before{
- .o-caret-up(8px);
- border-bottom-color: darken(@we_color-accent,10%);
- .o-position-absolute(-15px, auto, auto, 5px);
- }
- > li > a {
- color: @we_color-text-light;
- &:hover {
- color: white;
- }
- }
- }
- #colors_preview {
- padding: 4px;
- border-radius: 2px;
- border: 1px solid #989898;
- border-color:fadeOut(@we_color-text-normal, 0.5);
- }
- .note-color-palette td > button, .note-color-palette div .note-color-btn {
- border-color: fadeOut(white, 50%);
- border-radius: 0;
- margin: 1px;
+table.colorpicker {
+ width: 100%;
+ td {
+ padding: 0 2px 2px 0;
+ > button {
+ width: 100%;
+ border: 1px solid black;
+ padding: 0;
+ &::after {
+ content: "A";
+ font-weight: bold;
+ vertical-align: sub;
+ }
+ }
}
- }
}
+.colorpicker {
+ background-color: @o-we-color-dark!important;
+
+ .o_colorpicker_sections {
+ border: 1px solid darken(@o-we-color-dark, 12%);
+ border-width: 1px 0 0;
+ font-size: 14px;
+
+ .o_colorpicker_section_menu {
+ width: 50px;
+ height: 100%;
+ float: left;
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ text-align: center;
+
+ > li {
+ display: block;
+ float: none;
+ margin: 0;
+ background-color: transparent;
+ > a {
+ display: block;
+ padding: 5px 10px!important;
+ border-radius: 0;
+ background-color: transparent;
+ color: darken(@o-we-color-text-light, 10%);
+ > i.fa {
+ font-size: 20px;
+ }
+
+ &:focus, &:active, &:focus:active {
+ outline: none;
+ }
+ }
+ &:hover, &.active {
+ > a {
+ color: white;
+ }
+ }
+ &.active > a {
+ background-color: @o-we-tab-active-bg!important;
+ }
+ }
+ }
+ .o_colorpicker_section_tabs {
+ width: 200px;
+ height: 100%;
+ margin-left: 50px;
+ .tab-pane {
+ padding: 5px 10px;
+ background-color: @o-we-tab-active-bg;
+ }
+ }
+ }
+ .o_colorpicker_section {
+ &:after {
+ content: "";
+ display: table;
+ clear: both;
+ }
-.foreground_toggle, .background_toggle{
- > button {
- width: 30px!important;
- text-align: center;
- }
- > button > .caret {
- display: none;
- }
-}
-.foreground_toggle > button:before{
- font-family:FontAwesome;
- content:'\f1fc';
-}
-.background_toggle > button:before{
- font-family:'Material Icons';
- content:'\E23A';
-}
-.note-popover .popover-content{
- .note-color{
- border: 1px solid @we_color-divider;
- border-width: 0 1px;
- .dropdown-menu{
- min-width: 250px!important;
- padding: 0!important;
- .note-palette-title{
+ > button {
+ position: relative;
+ display: block;
+ width: 100%;
+ height: 30px;
+ border: 1px solid @o-we-color-dark;
+ border-radius: 3px;
+ margin: 0 0 5px;
+ padding: 0 20px;
+ line-height: 28px;
+ font-size: 12px;
+ font-weight: bold;
+ text-align: left;
+ &:hover, &.selected {
+ box-shadow: 0px 0px 2px 2px @o-we-color-light;
+ }
+ &.selected:before {
+ content: "\f00c";
+ font-family: "FontAwesome";
+ color: @odoo-brand-optional;
+ .o-position-absolute(@top: 0, @left: 3px);
+ font-size: 13px;
+ line-height: 28px;
+ }
+
+ &:after {
+ content: "A";
+ .o-position-absolute(0, 0);
+ width: 25px;
+ text-align: center;
+ line-height: 28px;
+ font-weight: normal;
+ }
+
+ &[data-event="foreColor"] {
+ background-color: @o-we-color-normal;
+ &:after {
+ background-color: fade(white, 30%);
+ }
+ }
+
+ &.o_small {
+ float: left;
+ width: auto;
+ min-width: 27px;
+ padding: 0;
+ margin-right: 5px;
+ }
+ }
+ }
+ .note-palette-title {
padding: 10px 0px 10px 10px;
- color: @we_color-text-light;
+ color: @o-we-color-text-light;
font-weight: bold;
- position: absolute;
- }
- .palette-reset{
- text-align: right;
- width: 100%;
+ }
+ .palette-reset {
+ .o-position-absolute(0, 0);
margin: 0;
padding: 5px 10px 0;
- .note-color-reset{
- float: right;
- margin: 3px 0 0;
- padding: 0;
- &:hover{
- background: transparent!important;
- color: @we_color-danger;
- }
- }
- }
+ .note-color-reset {
+ font-size: 20px!important;
+ margin: 3px 0 0;
+ padding: 0;
+ &:hover {
+ background: transparent!important;
+ color: @o-we-color-danger;
+ }
+ }
}
- }
}
+// ENTER IN EDIT MODE
+body.editor_enable {
+ padding-top: @odoo-navbar-height!important;
-.note-popover .popover-content .dropdown-menu, #oe_manipulators .snippet-option-colorpicker .dropdown-menu{
- > li{
- background-color: @we_color-darker;
- min-width: 250px!important
- }
- .tabs_container{
- background-color: @we_color-darker;
- font-size: 0;
- background-color: @we_tab--active-bg;
- border: 1px solid darken(@we_tab-bg,10%);
- border-width: 1px 0 0;
- margin: 5px 0 0;
- .tabs_toggles{
- display: table-cell;
- font-size: 14px;
- width: 50px;
- padding:0;
- margin: 0;
- list-style: none;
- height: 100%;
- vertical-align: top;
- background-color: @we_tab-bg;
- li{
- background: transparent;
- margin-bottom: 10px;
- &:last-child{
- margin-bottom: 0;
+ #web_editor-top-edit {
+ background-color: @o-we-color-dark;
+ form.navbar-form {
+ right: 0;
}
- > a {
- padding: 5px 10px;
- display: block;
- }
- > a > i {
- visibility: visible;
- color: darken(@we_color-text-light, 10%);
- }
- &:hover, &.active{
- > a > i {color: white}
- }
- &.active > a{
- background-color: @we_tab--active-bg;
- }
- }
- }
- .tabs{
- display: table-cell;
- font-size: 14px;
- height: 100%;
- width: 200px;
}
- .tab{
- display: none;
- padding: 5px 10px;
- background-color: @we_tab--active-bg;
- }
- .tab.on{
- display: block;
- }
- }
-}
+ &.editor_has_snippets {
+ .o-transition(padding-left, 400ms, @o-we-md-ease);
+ padding-left: @o-we-sidebar-width!important;
-// COLORPICKER
-// ====================================
-
-#oe_manipulators .snippet-option-colorpicker .dropdown-menu{
-
- .note-palette-title{
- padding: 10px 0px 10px 10px;
- color: @we_color-text-light;
- font-weight: bold;
- position: absolute;
- }
- .palette-reset{
- text-align: right;
- width: 100%;
- margin: 0;
- padding: 5px 10px 0;
- cursor: pointer;
- .note-color-reset{
- float: right;
- margin: 3px 0 0;
- padding: 0;
- &:hover{
- background: transparent!important;
- color: @we_color-danger;
- }
- }
- }
-}
-.popover-content, .dropdown-menu {
- .palette_theme, .palette_ui, .palette_grayscale {
- button {
- display: block;
- font-size: 12px;
- width: 100%;
- max-width: 180px;
- padding: 5px 20px;
- margin: 0;
- position: relative;
- text-align: left;
- background-color: @we_color-normal;
- border: 1px solid @we_color-dark;
- height: 30px;
- color: @we_color-text-light;
- white-space: nowrap;
- overflow: auto;
- font-weight: 600;
- -webkit-font-smoothing: antialiased;
- .border-radius(3px);
- margin-bottom: 5px;
- span {
- height: 20px;
- width: 25px;
- float: right;
- display: inline-block;
- border: 1px solid #393c44;
- .o-position-absolute(4px, 5px);
- box-shadow: -10px 0px 10px @we_color-normal;
- }
- &:hover {
- border: 1px solid @we_color-dark;
- background: @we_color-light;
- color: white;
- span {
- box-shadow: -10px 0px 10px @we_color-light;
- }
- }
- }
- button.selected{
- border: 1px solid @we_color-dark;
- background: @we_color-light;
- color: white;
- span {
- box-shadow: -10px 0px 10px @we_color-light;
- }
- &:before{
- content: "\f00c";
- font-family: "FontAwesome";
- color: @we_color-accent;
- position: absolute;
- left: 5px;
- line-height: 1.7;
- font-size: 0.8em;
- }
+ #oe_snippets {
+ left: 0;
+ }
}
- }
}
+#web_editor_inside_iframe {
+ background-color: @odoo-brand-secondary;
+ #editable_area {
+ font: inherit !important;
+ line-height: inherit !important;
+ color: inherit !important;
-
-
-// ENTER IN EDIT MODE
-// ============================================
-
-body.editor_enable {
- #web_editor-top-edit {
- background-color: transparent;
- }
- #web_editor_snippets {
- .transition(left 0.4s @we_md-ease);
- }
-}
-
-body.editor_enable.editor_has_snippets {
- #web_editor-top-edit {
- .transition(background 0.4s @we_md-ease);
- background-color: @we_color-dark;
- .navbar-form {
- right: 0;
+ p {
+ margin: initial;
+ }
+ a, a:hover {
+ color: inherit;
+ }
+ }
+ &.editor_enable #wrapwrap {
+ height: 100%;
+ padding-top: @odoo-navbar-height;
+ > main {
+ height: 100%;
+ #editable_area {
+ position: relative;
+ overflow: hidden;
+ max-width: 600px;
+ min-height: 100%;
+ margin: auto;
+
+ background-color: white;
+ }
+ }
+ }
+ .note-color-palette .colorpicker {
+ display: none;
}
- }
- #web_editor_snippets {
- left: 0;
- }
}
diff --git a/addons/web_editor/static/src/less/web_editor.variables.less b/addons/web_editor/static/src/less/web_editor.variables.less
index d72d63931bd..043dd0f404e 100644
--- a/addons/web_editor/static/src/less/web_editor.variables.less
+++ b/addons/web_editor/static/src/less/web_editor.variables.less
@@ -1,76 +1,77 @@
-// Fonts
-// =======================
-@we_font-default : "Roboto", Roboto, sans-serif;
-@we_font-size-def : 14px;
-
-// COLORS UI
-// =======================
-@we_color-dark : #2c2c36;
-@we_color-darker : darken(@we_color-dark,2%);
-@we_color-divider : #33363e;
-@we_color-normal : #50545d;
-@we_color-light : #4e525b;
-
-@we_color-paper : #fbfbfd;
-@we_color-inactive : #646465;
-
-@we_color-text-normal : #999999;
-@we_color-text-light : #d4d5d7;
-@we_color-text-dark : #505050;
-
-@we_color-accent : #1cc1a9;
-@we_color-accent-d10 : darken(@we_color-accent, 10%);
-@we_color-primary : #b35e9b;
-@we_color-primary-d10 : darken(@we_color-primary, 10%);
-@we_color-primary-l10 : lighten(@we_color-primary, 10%);
-@we_color-primary-hover : #7e376b;
-
-@we_color-danger : #e6586c;
-@we_color-success : #4ab980;
-
-
-// LAYOUT
-// =======================
-@we_screen_xs : 480px;
-@we_screen_sm : 768px;
-@we_screen_md : 992px;
-@we_screen_lg : 1200px;
-
-
-// TOP BAR
-// =======================
-@we_editor-bar-height : 45px;
-@we_editor-dropdown-border-height : 2px;
-@we_editor-bar-bg : @we_color-primary;
-@we_editor-bar-link-color : @we_color-paper;
-@we_editor-bar-link-shadow : @we_color-primary-d10;
-
-
-// EDITOR
-// =======================
-@we_sidebar-width: 210px;
-
-
-// SHADOWS
-// =======================
-@we_box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
- 0 3px 1px -2px rgba(0, 0, 0, 0.2),
- 0 1px 5px 0 rgba(0, 0, 0, 0.12);
-
-
-// DROPDOWNS
-// =======================
-@we_dropdown-toggle-color : @we_color-paper;
-@we_dropdown-toggle-shadow-color : @we_color-primary-d10;
-@we_dropdown-menu-color : @we_color-primary-hover;
- // open
- @we_dropdown--open-toggle-color : white;
- @we_dropdown--open-toggle-bg-color : @we_color-primary-hover;
- @we_dropdown--open-toggle-shadow-color : @we_color-primary-hover;
-
-
-// TABS
-// =======================
-@we_tab-bg: @we_color-darker;
-@we_tab--active-bg: #3D4048;
+@o-we-color-dark: #2c2c36;
+@o-we-color-darker: darken(@o-we-color-dark, 2%);
+@o-we-color-divider: #33363e;
+@o-we-color-light: #4e525b;
+@o-we-color-normal: #50545d;
+@o-we-color-paper: #fbfbfd;
+@o-we-color-text-normal: #999999;
+@o-we-color-text-light: #d4d5d7;
+@o-we-color-danger: #e6586c;
+
+@o-we-sidebar-width: 210px;
+
+@o-we-tab-active-bg: #3D4048;
+
+// Transitions
+@o-we-md-ease: cubic-bezier(0.19, 1, 0.22, 1);
+
+// Animations
+@-webkit-keyframes fadeInDownSmall {
+ 0% {
+ opacity: 0;
+ .translate(0, -5px);
+ }
+ 100% {
+ opacity: 1;
+ .translate(0, 0);
+ }
+}
+@keyframes fadeInDownSmall {
+ 0% {
+ opacity: 0;
+ .translate(0, -5px);
+ }
+ 100% {
+ opacity: 1;
+ .translate(0, 0);
+ }
+}
+
+@-webkit-keyframes fadeInOut {
+ 0% {
+ opacity: 0;
+ }
+ 25% {
+ opacity: 1;
+ }
+ 75% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+@keyframes fadeInOut {
+ 0% {
+ opacity: 0;
+ }
+ 25% {
+ opacity: 1;
+ }
+ 75% {
+ opacity: 1;
+ }
+ 100% {
+ opacity: 0;
+ }
+}
+
+@-webkit-keyframes inputHighlighter {
+ from { background: @odoo-brand-optional; }
+ to { width: 0; background: transparent; }
+}
+@keyframes inputHighlighter {
+ from { background: @odoo-brand-optional; }
+ to { width: 0; background: transparent; }
+}