diff --git a/extensions/odoo_theme/static/fonts/icomoon.woff2 b/extensions/odoo_theme/static/fonts/icomoon.woff2 new file mode 100644 index 000000000..b835f6708 Binary files /dev/null and b/extensions/odoo_theme/static/fonts/icomoon.woff2 differ diff --git a/extensions/odoo_theme/static/scss/_iconfont.scss b/extensions/odoo_theme/static/scss/_iconfont.scss index 5deea8555..ee7e03fb6 100644 --- a/extensions/odoo_theme/static/scss/_iconfont.scss +++ b/extensions/odoo_theme/static/scss/_iconfont.scss @@ -4,7 +4,7 @@ [class^="i-"], [class*=" i-"] { /* use !important to prevent issues with browser extensions that change fonts */ - font-family: '#{$icomoon-font-family}' !important; + font-family: 'icomoon' !important; speak: never; font-style: normal; font-weight: normal; diff --git a/extensions/odoo_theme/static/scss/_mixins.scss b/extensions/odoo_theme/static/scss/_mixins.scss index 9529fc8d1..14f1fc89d 100644 --- a/extensions/odoo_theme/static/scss/_mixins.scss +++ b/extensions/odoo_theme/static/scss/_mixins.scss @@ -89,7 +89,7 @@ @mixin inline-icomoon($icon-content, $margin, $v-align: middle, $font-size: 1.5rem, $font-weight: $fw_regular) { content: '#{$icon-content}'; - font-family: '#{$icomoon-font-family}' !important; + font-family: 'icomoon' !important; @include font-size($font-size); font-weight: $font-weight; vertical-align: $v-align; diff --git a/extensions/odoo_theme/static/scss/_typography.scss b/extensions/odoo_theme/static/scss/_typography.scss index be839388f..e41ff2b6f 100644 --- a/extensions/odoo_theme/static/scss/_typography.scss +++ b/extensions/odoo_theme/static/scss/_typography.scss @@ -6,45 +6,19 @@ // Fonts //------------------------------------------------------------------------------ @import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500&display=swap'); - +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap'); @font-face { - font-family: '#{$icomoon-font-family}'; - src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?6i2y1w'); - src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?6i2y1w#iefix') format('embedded-opentype'), - url('#{$icomoon-font-path}/#{$icomoon-font-family}.ttf?6i2y1w') format('truetype'), - url('#{$icomoon-font-path}/#{$icomoon-font-family}.woff?6i2y1w') format('woff'), - url('#{$icomoon-font-path}/#{$icomoon-font-family}.svg?6i2y1w##{$icomoon-font-family}') format('svg'); + font-family: 'icomoon'; + src: url('fonts/icomoon.woff2') format('woff2'), + url('fonts/icomoon.woff') format('woff'); font-weight: normal; font-style: normal; font-display: block; } -@font-face { - font-family: 'Inter'; - font-weight: 100 900; - font-display: swap; - font-style: normal; - font-named-instance: 'Regular'; - src: url("Inter-roman.var.woff2?v=3.15") format("woff2"); -} - -@font-face { - font-family: 'Inter'; - font-weight: 100 900; - font-display: swap; - font-style: italic; - font-named-instance: 'Italic'; - src: url("Inter-italic.var.woff2?v=3.15") format("woff2"); -} - -//------------------------------------------------------------------------------ -// Font rendering -//------------------------------------------------------------------------------ html body{ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - font-family: Inter, Helvetica, sans-serif; - font-weight: 400; } //------------------------------------------------------------------------------ diff --git a/extensions/odoo_theme/static/scss/_variables.scss b/extensions/odoo_theme/static/scss/_variables.scss index a5d84f8e4..0a2e61a61 100644 --- a/extensions/odoo_theme/static/scss/_variables.scss +++ b/extensions/odoo_theme/static/scss/_variables.scss @@ -75,9 +75,6 @@ $font-size-secondary: .875rem; // icomoon icons //------------------------------------------------------------------------------ -$icomoon-font-family: "icomoon" !default; -$icomoon-font-path: "fonts" !default; - $i-arrow-up: "\e948"; $i-arrow-down: "\e945"; $i-arrow-left: "\e946"; diff --git a/extensions/odoo_theme/static/scss/bootstrap_overridden.scss b/extensions/odoo_theme/static/scss/bootstrap_overridden.scss index ba1d67445..b832fe332 100644 --- a/extensions/odoo_theme/static/scss/bootstrap_overridden.scss +++ b/extensions/odoo_theme/static/scss/bootstrap_overridden.scss @@ -1,18 +1,11 @@ // // BS Variables // - -// The contrast ratio value that determines when the lightness of color changes from "dark" to "light". Acceptable values are 3 , 4.5 and 7. -/* $min-contrast-ratio: 4.5; */ -// Components -// -$enable-shadows : true; -// Define common padding and border radius sizes and more. +/* $enable-responsive-font-sizes: true; */ // Fonts -// // Font, line-height, and color for body text, headings, and more. - +$font-family-base: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif !default; $h1-font-size: 1.875rem; $h2-font-size: 1.5rem; $h3-font-size: 1.125rem; @@ -20,64 +13,12 @@ $h4-font-size: 1rem; $h5-font-size: 1rem; $h6-font-size: $font-size-secondary; -$display-line-height: 1; - -/* $blockquote-font-size: $font-size-base !default; */ - // Buttons -// // For each of Bootstrap's buttons, define text, background, and border color. $btn-font-size: $font-size-secondary; $btn-font-weight: $fw_semibold; $btn-focus-box-shadow: 0 0 0 transparent; -// Badges - -/* $badge-font-size: 0.9em; */ - -// Pagination - -$pagination-color: o-color('600'); -$pagination-bg: transparent; -$pagination-border-color: o-color('300'); - -$pagination-hover-color: o-color('o-cc1-link'); -$pagination-hover-bg: transparent; -$pagination-hover-border-color: o-color('o-cc1-link'); - -$pagination-active-color: o-color('900'); -$pagination-active-bg: transparent; -$pagination-active-border-color: o-color('900'); - -// Cards - -$card-spacer-y: 15rem / 16; -$card-spacer-x: 15rem / 16; - -$card-border-width: 1px; -$card-border-color: rgba(0,0,0,.06); -$card-cap-bg: transparent; - -// Tooltips - -$tooltip-max-width: 220px; -$tooltip-opacity: 1; - -$tooltip-arrow-width: 4rem / 16; - -// Popovers - -$popover-border-color: transparent; - -$popover-arrow-width: 10rem / 16; - -// List group - -$list-group-border-color: $card-border-color; - -$nav-pills-link-active-color: #fff; -$nav-pills-link-active-bg: o-color('o-color-2'); - // Dropdowns $dropdown-min-width: 4.5rem; \ No newline at end of file diff --git a/extensions/odoo_theme/static/style.scss b/extensions/odoo_theme/static/style.scss index bc86e0fbc..f8426df2b 100644 --- a/extensions/odoo_theme/static/style.scss +++ b/extensions/odoo_theme/static/style.scss @@ -598,7 +598,7 @@ header.o_main_header{ visibility: hidden !important; &:after { content: '#{$i-link}'; - font-family: $icomoon-font-family !important; + font-family: icomoon !important; @include font-size($font-size-base); vertical-align: middle; margin: 0 1rem 0 0;