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 #2247

X-original-commit: 93900b4
Signed-off-by: Rémi Rahir (rar) <[email protected]>
Signed-off-by: Minne Adrien (adrm) <[email protected]>
  • Loading branch information
hokolomopo committed Mar 27, 2023
1 parent d1e5470 commit d773199
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 { NEWLINE } from "../../../constants";
import { DEFAULT_FONT, NEWLINE } from "../../../constants";
import { EnrichedToken } from "../../../formulas/index";
import { functionRegistry } from "../../../functions/index";
import {
Expand Down Expand Up @@ -63,6 +63,7 @@ css/* scss */ `
padding-right: 2px;
box-sizing: border-box;
font-family: ${DEFAULT_FONT};
caret-color: black;
padding-left: 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 @@ -55,9 +55,6 @@ css/* scss */ `
color: #333;
}
* {
font-family: "Roboto", "RobotoDraft", Helvetica, Arial, sans-serif;
}
&,
*,
*:before,
Expand Down

0 comments on commit d773199

Please sign in to comment.