aboutsummaryrefslogtreecommitdiff
path: root/packages/memory-graph/src/styles/global.css.ts
blob: ec08d959cd7f43579a16837292bb268054896328 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { globalStyle } from "@vanilla-extract/css"

/**
 * Global CSS reset and base styles
 */

// Box sizing reset
globalStyle("*, *::before, *::after", {
	boxSizing: "border-box",
})

// Remove default margins
globalStyle("body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd", {
	margin: 0,
})

// Remove list styles
globalStyle("ul[role='list'], ol[role='list']", {
	listStyle: "none",
})

// Core body defaults
globalStyle("html, body", {
	height: "100%",
})

globalStyle("body", {
	lineHeight: 1.5,
	WebkitFontSmoothing: "antialiased",
	MozOsxFontSmoothing: "grayscale",
})

// Typography defaults
globalStyle("h1, h2, h3, h4, h5, h6", {
	fontWeight: 500,
	lineHeight: 1.25,
})

// Inherit fonts for inputs and buttons
globalStyle("input, button, textarea, select", {
	font: "inherit",
})

// Remove default button styles
globalStyle("button", {
	background: "none",
	border: "none",
	padding: 0,
	cursor: "pointer",
})

// Improve media defaults
globalStyle("img, picture, video, canvas, svg", {
	display: "block",
	maxWidth: "100%",
})

// Remove built-in form typography styles
globalStyle("input, button, textarea, select", {
	font: "inherit",
})

// Avoid text overflows
globalStyle("p, h1, h2, h3, h4, h5, h6", {
	overflowWrap: "break-word",
})

// Improve text rendering
globalStyle("#root, #__next", {
	isolation: "isolate",
})