Skip to content

Commit

Permalink
[MIG] web_theme_classic from 16.0 to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
legalsylvain committed Nov 8, 2023
1 parent 45dca0a commit f0dddde
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 57 deletions.
2 changes: 1 addition & 1 deletion web_theme_classic/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
"name": "Web Theme Classic",
"summary": "Contrasted style on fields to improve the UI.",
"version": "16.0.1.0.2",
"version": "17.0.1.0.0",
"author": "GRAP, Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/web",
Expand Down
92 changes: 36 additions & 56 deletions web_theme_classic/static/src/scss/web_theme_classic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,84 +13,64 @@ $button-border-color: #dee2e6;
Form View : Handle Fields Borders
************************************************************/

.o_input,
.o_field_html > .note-editable {
/* Add border for all editable fields */
border: 1px solid $input-border-color !important;
border-radius: 3px;

/* add darker border on focus */
&:focus {
border-color: $input-border-color-focus !important;
.o_form_view {
.o_input,
.o_field_html > .note-editable {
/* Add border for all editable fields */
border: 1px solid $input-border-color !important;
border-radius: 3px;

/* add darker border on focus */
&:focus {
border-color: $input-border-color-focus !important;
}
}
}

.o_field_many2many_selection {
.o_input {
/* Prevent to have double border for many2many tags input fields */
border: 0px solid !important;
.o_field_many2many_selection {
.o_input {
/* Prevent to have double border for many2many tags input fields */
border: 0px solid !important;
}
}
}

/***********************************************************
Form View : Handle Button Borders
************************************************************/

.btn-secondary,
.btn-light {
border-color: $button-border-color;
}

.btn-light {
&:hover {
.o_form_view {
.btn-light {
border-color: $button-border-color;
}
}

.btn-light {
&:hover {
border-color: $button-border-color;
}
}
}
/***********************************************************
Form View : Handle Background for required fields
************************************************************/

.o_required_modifier:not(.o_readonly_modifier) {
.o_input {
/* Add background for all editable and required fields */
background-color: $input-background-color-required !important;
.o_form_view {
.o_required_modifier:not(.o_readonly_modifier) {
.o_input {
/* Add background for all editable and required fields */
background-color: $input-background-color-required !important;

/* darker placeholder as the background is darker */
&::placeholder {
color: $input-color-placeholder-required;
/* darker placeholder as the background is darker */
&::placeholder {
color: $input-color-placeholder-required;
}
}
}
}

.o_required_modifier.o_field_selection:not(.o_readonly_modifier) {
/* Specific case for field selection */
background-color: $input-background-color-required !important;
}

/***********************************************************
Search View : Search Bar Input
************************************************************/
div.o_searchview[role="search"] {
/* Add border for the searchable zone */
border: 1px solid $input-border-color !important;
border-radius: 3px;

/* add darker border when input inside has focus */
&:focus-within {
border-color: $input-border-color-focus !important;
.o_required_modifier.o_field_selection:not(.o_readonly_modifier) {
/* Specific case for field selection */
background-color: $input-background-color-required !important;
}
}

/* Adjust padding to avoid items to be sticked to borders */
div.o_searchview_facet[role="img"] {
padding-left: 2px;
}

i.o_searchview_icon[role="img"] {
padding-right: 2px;
}

/***********************************************************
Tree View : Handle style for required fields
************************************************************/
Expand Down

0 comments on commit f0dddde

Please sign in to comment.