Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use beige as grapher background color #3637

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@ourworldindata/components/src/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $gray-20: #e7e7e7;
$gray-10: #f2f2f2;
$gray-5: #f7f7f7;

$beige: #fbf9f3;
$beige: #fffbf5;
$white: #ffffff;

// Accent colors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ $controlRowHeight: 32px; // keep in sync with CONTROLS_ROW_HEIGHT

.CaptionedChart {
width: 100%;
background-color: $grapher-background-color;
}

.HeaderHTML,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
Patterns,
STATIC_EXPORT_DETAIL_SPACING,
DEFAULT_GRAPHER_FRAME_PADDING,
GRAPHER_BACKGROUND_COLOR,
} from "../core/GrapherConstants"
import { MapChartManager } from "../mapCharts/MapChartConstants"
import { ChartManager } from "../chart/ChartManager"
Expand Down Expand Up @@ -443,7 +444,6 @@ export class CaptionedChart extends React.Component<CaptionedChartProps> {
fontFamily:
"Lato, 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif",
fontSize: this.manager.fontSize ?? BASE_FONT_SIZE,
backgroundColor: "white",
textRendering: "geometricPrecision",
WebkitFontSmoothing: "antialiased",
},
Expand Down Expand Up @@ -573,7 +573,7 @@ export class StaticCaptionedChart extends CaptionedChart {
{this.patterns}
<rect
className="background-fill"
fill="white"
fill={GRAPHER_BACKGROUND_COLOR}
width={width}
height={height}
/>
Expand Down
2 changes: 2 additions & 0 deletions packages/@ourworldindata/grapher/src/core/GrapherConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const DEFAULT_GRAPHER_HEIGHT = 600
export const DEFAULT_GRAPHER_FRAME_PADDING = 16
export const STATIC_EXPORT_DETAIL_SPACING = 8

export const GRAPHER_BACKGROUND_COLOR = "#fbf9f3" // beige

export const GRAPHER_DARK_TEXT = "#5b5b5b"
export const GRAPHER_LIGHT_TEXT = "#858585"

Expand Down
3 changes: 2 additions & 1 deletion packages/@ourworldindata/grapher/src/core/grapher.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
@import "./typography.scss";

// grapher frame
$frame-color: $gray-10;
$grapher-background-color: $beige;
$frame-color: #f2f2f2;

// text
$dark-text: $gray-80;
Expand Down