forge
Explore
Log in

Don't you dare go Hollow

im

Clone
★ 0

0 watching0 forksRustAGPL-3.0542.8 KiBb9f0726Tahinli27 days ago34 commits

_base.scss117 lines, 1.9 KiBHistoryRawDownload
1//! Element defaults: the reset, the body type, links, headings and focus. Nothing here is a class;
2//! a page gets its look from elements it writes plainly, and from the component classes.
3
4*,
5*::before,
6*::after {
7 box-sizing: border-box;
8}
9
10html {
11 -webkit-text-size-adjust: 100%;
12 text-size-adjust: 100%;
13}
14
15body {
16 margin: 0;
17 background: var(--bg);
18 color: var(--text);
19 font-family: var(--font-sans);
20 font-size: 1rem;
21 line-height: 1.55;
22 -webkit-font-smoothing: antialiased;
23}
24
25h1,
26h2,
27h3 {
28 line-height: 1.25;
29 margin: 0 0 var(--space-3);
30 font-weight: 650;
31 letter-spacing: -0.01em;
32}
33
34h1 {
35 font-size: var(--text-xl);
36}
37
38h2 {
39 font-size: var(--text-lg);
40}
41
42h3 {
43 font-size: 1rem;
44}
45
46p {
47 margin: 0 0 var(--space-3);
48}
49
50a {
51 color: var(--accent);
52 text-decoration-thickness: 1px;
53 text-underline-offset: 0.2em;
54}
55
56a:hover {
57 color: var(--accent-strong);
58}
59
60img,
61svg {
62 display: block;
63 max-width: 100%;
64}
65
66code,
67kbd,
68pre {
69 font-family: var(--font-mono);
70 font-size: 0.92em;
71}
72
73:focus-visible {
74 outline: 2px solid var(--focus);
75 outline-offset: 2px;
76 border-radius: 2px;
77}
78
79::selection {
80 background: var(--accent-soft);
81}
82
83// The `hidden` attribute must win over any display rule a component sets.
84[hidden] {
85 display: none !important;
86}
87
88// Visible only to screen readers.
89.sr-only {
90 position: absolute;
91 width: 1px;
92 height: 1px;
93 padding: 0;
94 margin: -1px;
95 overflow: hidden;
96 clip: rect(0, 0, 0, 0);
97 white-space: nowrap;
98 border: 0;
99}
100
101// The first focusable element. It is off screen until a keyboard user tabs to it.
102.skip-link {
103 position: absolute;
104 top: var(--space-2);
105 left: var(--space-2);
106 z-index: 100;
107 padding: var(--space-2) var(--space-3);
108 background: var(--surface);
109 color: var(--text);
110 border-radius: var(--radius-sm);
111 box-shadow: var(--shadow-lift);
112 transform: translateY(-200%);
113}
114
115.skip-link:focus {
116 transform: none;
117}