Skip to content

Instantly share code, notes, and snippets.

@danielschmid
Last active March 7, 2022 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielschmid/10236a2b5686a04480eec1129647c804 to your computer and use it in GitHub Desktop.
Save danielschmid/10236a2b5686a04480eec1129647c804 to your computer and use it in GitHub Desktop.
import { globalFontFace, globalStyle } from "@vanilla-extract/css"
import { theme } from "./theme.css"
globalFontFace("UntitledSansRegular", {
src: "./fonts/untitled-sans-regular.woff2"
// i’ve also tried:
// src: 'local("./fonts/untitled-sans-regular.woff2")',
});
globalStyle("*", {
boxSizing: "border-box",
})
globalStyle("html", {
backgroundColor: theme.colors.background,
color: theme.colors.text,
})
globalStyle("html, body", {
height: "100%",
fontSize: "18px",
})
globalStyle("body", {
margin: 0,
fontFamily: "UntitledSansRegular",
lineHeight: 1.5,
WebkitFontSmoothing: "antialiased",
})
globalStyle("a", {
color: theme.colors.text,
textDecoration: "none",
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment