Use native system fonts on Android and iOS

This behavior is called for in the new designs, but Compound Web doesn't (yet) implement it by default.
This commit is contained in:
Robin
2023-09-17 12:54:18 -04:00
parent c481d3c908
commit 9736f0244b
4 changed files with 57 additions and 23 deletions

View File

@@ -24,6 +24,7 @@ import * as Sentry from "@sentry/react";
import { getUrlParams } from "./UrlParams";
import { Config } from "./config/Config";
import { ElementCallOpenTelemetry } from "./otel/otel";
import { platform } from "./Platform";
enum LoadState {
None,
@@ -107,6 +108,9 @@ export class Initializer {
fonts.map((f) => `"${f}"`).join(", ")
);
}
// Add the platform to the DOM, so CSS can query it
document.body.setAttribute("data-platform", platform);
}
public static init(): Promise<void> | null {