-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
346 lines (315 loc) · 10.4 KB
/
index.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>fart.css, the fart-tastic CSS library!</title>
<meta
name="description"
content="CSS library of styles reusable across your ✨fart-tastic✨ frontends."
/>
<link rel="stylesheet" type="text/css" href="/fart.css" />
<link rel="icon" href="https://fart.tools/fl-logo.png" />
</head>
<body>
<section class="fart-section">
<nav>
<h1 id="top" class="fart-header">fart.css</h1>
<a
class="fart-button"
href="https://github.com/FartLabs/fart.css"
target="_blank"
>★Source<small>↗</small></a>
</nav>
<p>
fart.css is a CSS library of styles reusable across your
<span class="fart-sparkle">fart-tastic</span>
frontends.
</p>
<img src="bookcover.png" alt="fart.css book cover" />
</section>
<section class="fart-section">
<h2 id="toc">On this page</h2>
<ul>
<li>
<a href="#getting-started">Getting started</a>
</li>
<li>
<a href="#variables">Variables</a>
</li>
<li>
<a href="#fonts">Fonts</a>
</li>
<li>
<a href="#keyframes">Keyframes</a>
</li>
<li>
<a href="#semantics">Semantics</a>
<ul>
<li>
<a href="#headings">Headings</a>
</li>
<li>
<a href="#links">Links</a>
</li>
<li>
<a href="#lists">Lists</a>
</li>
<li>
<a href="#blockquotes">Blockquotes</a>
</li>
<li>
<a href="#fart-hr">Horizontal rule</a>
</li>
</ul>
</li>
<li>
<a href="#misc">Misc</a>
<ul>
<li>
<a href="#buttons">Buttons</a>
</li>
<li>
<a href="#fart-section">Sections</a>
</li>
<li>
<a href="#fart-header">Headers</a>
</li>
<li>
<a href="#fart-sparkle">Sparkles</a>
</li>
<li>
<a href="#fart-logo">Hoverable logos</a>
</li>
</ul>
</li>
</ul>
</section>
<section class="fart-section">
<h2 id="getting-started">Getting started</h2>
<p>
To get started with fart.css, include the following line in the
<code><head></code> of your HTML file:
</p>
<pre
><code><link rel="stylesheet" type="text/css" href="https://css.fart.tools" /></code></pre
>
<p>
From there, you can use the classes and styles provided by the fart.css
CSS library.
</p>
</section>
<section class="fart-section">
<h2 id="variables">Variables</h2>
<p>
fart.css provides a set of CSS variables
<code>var(--css-variable)</code> for colors:
</p>
<p>Colors are defined in the <a href="root.css">root.css</a> file.</p>
<pre
>
<code>:root {
--fart-primary: </code><code class="preview-color" style="font-weight: bold; color: var(--fart-primary);">#c3ef3c</code><code>;
--fart-dark-primary: </code><code class="preview-color"style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-dark-primary);">#004021</code><code>;
--fart-darker-dark-primary: </code><code class="preview-color"style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-darker-dark-primary);">#002d17</code><code>;
--fart-lighter-dark-primary: </code><code class="preview-color"style="font-weight: bold; background-color: var(--fart-off-white); color: var(--fart-lighter-dark-primary);">#005b31</code><code>;
--fart-secondary: </code><code class="preview-color"style="font-weight: bold; color: var(--fart-secondary);">#db7093</code><code>;
--fart-highlight: </code><code class="preview-color"style="font-weight: bold; color: var(--fart-highlight);">#db709384</code><code>;
--fart-white: </code><code class="preview-color"style="font-weight: bold; color: var(--fart-white);">#ddd</code><code>;
--fart-off-white: </code><code class="preview-color"style="font-weight: bold; color: var(--fart-off-white);">#aaa</code><code>;
}</code></pre
>
<script>
addEventListener("load", () => {
const root = document.querySelector(":root");
const rootStyles = getComputedStyle(root);
document.querySelectorAll(".preview-color").forEach(
(el) => {
const variableName =
el.style.color.match(/--[-a-z]+/i)[0];
if (!variableName) {
throw new Error("Could not find variable name");
}
el.textContent = rootStyles.getPropertyValue(
variableName,
);
},
);
});
</script>
</section>
<section class="fart-section">
<h2 id="fonts">Fonts</h2>
<p>
The <a href="fonts.css">fonts.css</a> file imports
<a href="https://fonts.google.com/specimen/Overpass">Overpass</a> from
Google Fonts.
</p>
</section>
<section class="fart-section">
<h2 id="keyframes">Keyframes</h2>
<p>
fart.css provides a set of keyframes for animations in the
<a href="keyframes.css">keyframes.css</a> file.
</p>
</section>
<section class="fart-section">
<h2 id="semantics">Semantics</h2>
<p>
fart.css provides implicit styling for a set of common HTML elements in
the <a href="semantics.css">semantics.css</a> file.
</p>
<p>Body and HTML elements are styled with:</p>
<pre
>
<code>html,
body {
background-color: var(--fart-dark-primary);
color: var(--fart-white);
font-family: sans-serif;
margin: 0;
}</code></pre
>
<p>
Check out the available styles in the
<a href="semantics.css">semantics.css</a> file.
</p>
<h3 id="headings">Headings</h3>
<p>
Headings <code><h1></code> through <code><h6></code> are
styled with a custom font and size.
</p>
<h1>Example h1</h1>
<h2>Example h2</h2>
<h3>Example h3</h3>
<h4>Example h4</h4>
<h5>Example h5</h5>
<h6>Example h6</h6>
<h3 id="links">Links</h3>
<p>
Links <code><a></code>, <code>.fart-link</code>, and
<code>.fart-link-visible-on-hover</code> are styled with a custom color
and hover effect. Use <code>.fart-link-visible-on-hover</code> to style
links whose underline is only visible on hover.
</p>
<ul>
<li>
<a class="fart-link" href="#links">Example .fart-link</a>
</li>
<li>
<a class="fart-link-visible-on-hover" href="#links"
>Example .fart-link-visible-on-hover</a>
</li>
</ul>
<h3 id="lists">Lists</h3>
<p>
Lists <code><ul></code> and <code><ol></code> are styled
with a custom color and padding.
</p>
<ul>
<li>Example list item 1</li>
<li>Example list item 2</li>
<li>
Example nested list
<ul>
<li>Example nested list item 1</li>
<li>Example nested list item 2</li>
</ul>
</li>
</ul>
<h3 id="blockquotes">Blockquotes</h3>
<p>
Blockquotes <code><blockquote></code> are styled with a custom
color and padding.
</p>
<blockquote>Example blockquote</blockquote>
<h3 id="fart-hr">Horizontal rule</h3>
<p>
Use <code><hr></code> or <code>.fart-hr</code> to create a
horizontal rule. The rule is styled with <code>var(--fart-primary)</code
>.
</p>
<hr />
</section>
<section class="fart-section">
<h2 id="misc">Misc</h2>
<p>
fart.css provides miscellaneous styles in the
<a href="misc.css">misc.css</a> file.
</p>
<h3 id="buttons">Buttons</h3>
<p>
Buttons <code>.fart-button</code> are have a rounded button style with a
custom color and hover effect.
</p>
<a class="fart-button" href="#buttons">Example button</a>
<h3 id="fart-section">Sections</h3>
<p>
Sections <code>.fart-section</code> are styled with a custom color and
padding.
</p>
<h3 id="fart-header">Headers</h3>
<p>
Headers <code>.fart-header</code> are styled with a custom font and
size.
</p>
<span class="fart-header">Example header</span>
<h3 id="fart-sparkle">Sparkles</h3>
<p>
Sparkles <code>.fart-sparkle</code> are styled with sparkle emojis on
either side of the text content.
</p>
<span class="fart-sparkle">Example sparkle</span>
<h3 id="fart-logo">Hoverable logos</h3>
<p>
Hoverable logos <code>.fart-logo</code> are styled with a custom
animation on hover.
</p>
<span
class="fart-logo"
href="#fart-logo"
style="font-size: 24pt; cursor: pointer"
>🧪</span>
</section>
<section class="fart-section">
<h2 id="bottom">You made it to the bottom!</h2>
<p>
Thanks for checking out fart.css! If you have any questions or feedback,
<a
class="fart-button"
href="https://go.fart.tools/chat"
target="_blank"
>Chat<small>↗</small></a>
with the community on Discord and check out our
<a
class="fart-button"
href="https://github.com/FartLabs/fart.css"
target="_blank"
>★Source<small>↗</small></a>
on GitHub! <a class="fart-button" href="#top">Top<small>↑</small></a>
</p>
</section>
<hr />
<footer>
<p>
© FartLabs <a class="fart-logo" href="https://fart.tools">🧪</a>
<br />
<a
class="fart-button"
href="https://fart.tools/blog"
target="_blank"
>Blog<small>↗</small></a>
<a
class="fart-button"
href="https://github.com/FartLabs"
target="_blank"
>GitHub<small>↗</small></a>
<a
class="fart-button"
href="https://go.fart.tools/chat"
target="_blank"
>Chat<small>↗</small></a>
</p>
</footer>
</body>
</html>