Skip to content

Commit

Permalink
[IMP] spreadsheet: inherit font family
Browse files Browse the repository at this point in the history
Now `spreadsheet` inherits the font family from its parent in the DOM.

Odoo task 3000885

closes odoo/o-spreadsheet#2246

X-original-commit: 93900b4222f1180200bf4aa4cf9997dd88d22871
Signed-off-by: Rémi Rahir (rar) <[email protected]>
  • Loading branch information
Topdev97 committed Mar 28, 2023
1 parent e4e7b4a commit 2e79720
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions demo/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ html {
body {
height: 100%;
margin: 0px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Ubuntu,
"Noto Sans", Arial, sans-serif !important;
}
.o-spreadsheet {
width: 100%;
Expand Down
3 changes: 2 additions & 1 deletion src/components/composer/composer/composer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, onMounted, onPatched, onWillUnmount, useRef, useState } from "@odoo/owl";
import { ComponentsImportance, SELECTION_BORDER_COLOR } from "../../../constants";
import { ComponentsImportance, DEFAULT_FONT, SELECTION_BORDER_COLOR } from "../../../constants";
import { EnrichedToken } from "../../../formulas/index";
import { functionRegistry } from "../../../functions/index";
import { isEqual, rangeReference, splitReference, zoneToDimension } from "../../../helpers/index";
Expand Down Expand Up @@ -50,6 +50,7 @@ css/* scss */ `
flex-grow: 1;
max-height: inherit;
.o-composer {
font-family: ${DEFAULT_FONT};
caret-color: black;
padding-left: 3px;
padding-right: 3px;
Expand Down
1 change: 1 addition & 0 deletions src/components/figures/chart/scorecard/chart_scorecard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const LINE_HEIGHT = 1.2;

css/* scss */ `
div.o-scorecard {
font-family: ${DEFAULT_FONT};
user-select: none;
background-color: white;
display: flex;
Expand Down
3 changes: 0 additions & 3 deletions src/components/spreadsheet/spreadsheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ css/* scss */ `
color: #333;
}
* {
font-family: "Roboto", "RobotoDraft", Helvetica, Arial, sans-serif;
}
&,
*,
*:before,
Expand Down

0 comments on commit 2e79720

Please sign in to comment.