-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.njk
552 lines (492 loc) · 15 KB
/
index.njk
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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
---
title: Lightning Fast Utility Generator for Sass
layout: layouts/base.njk
scss_example: |
@use "uniform" as * with (
$config: (
important: true
)
);
css_example: |
.text-left {
text-align: left !important;
}
.text-center {
text-align: center !important;
}
.text-right {
text-align: right !important;
}
.block {
display: block !important;
}
.flex {
display: flex !important;
}
clone_uniform: |
npm install uniformcss
compile_uniform: |
@use "uniform" as *;
load_uniform: |
<head>
<!-- Load your compiled stylesheet here -->
<link rel="stylesheet" href="/uniform.min.css">
</head>
<body>
<!-- Style components using composable utilities -->
<div class="max-w-1025 mx-auto py-48">
<h1 class="text-4xl text-center extrabold color-pink-500 mb-24">
Hello World!
</h1>
</div>
</body>
add_animation: |
<div class="animate-ping ..."></div>
load_plugins: |
@use "uniform" as *;
@use "uniform/plugins/wrapper";
@use "uniform/plugins/markdown";
@use "uniform/plugins/ratio";
@use "uniform/plugins/animate";
@use "uniform/plugins/ring";
animate_plugin: |
<main class="wrapper markdown">
<h1 class="fade-in-from-top" style="--animate-delay: 0s;">
Typewriter delectus cred
</h1>
<p class="fade-in-from-top" style="--animate-delay: 0.2s;">
Cosby sweater plaid shabby chic kitsch pour-over ex.
Meggings kogi vinyl meh, food truck banh mi Etsy.
</p>
<button class="ring">Focus me</button>
</main>
api_function_input: |
@use "uniform" as * with (
$config: (
colors: ( navbar: #3a37d3 ),
shadows: ( card: 0 4px 60px 0 rgba(90, 134, 234, 0.2) )
)
);
.navbar {
display: flex;
background: fill(navbar);
box-shadow: shadow(card);
padding: size(20, 24);
}
api_function_output: |
.navbar {
display: flex;
background: #3a37d3;
box-shadow: 0 4px 60px 0 rgba(90, 134, 234, 0.2);
padding: 1.25rem 1.5rem;
}
configure_sass: |
@use "uniform" as * with (
$config: (
colors: (
navbar: #3a37d3,
footer: #5a6072,
seagreen: #188657,
),
shadows: (
card: 0 4px 60px 0 rgba(90, 134, 234, 0.2)
)
)
);
configure_css: |
:root {
--font-sans: sans-serif;
--font-mono: menlo;
--semibold: 600;
--bold: 700;
--extrabold: 800;
}
# SECTION - POWER FEATURES
config_shorthand_input: |
// main.scss
@use "uniform" as * with (
$config: (
utilities: (
margin-top: (
shorthand: mt
),
margin-right: (
shorthand: marginRight
)
)
)
);
config_shorthand_output: |
/* main.css */
.mt-1 {
margin-top: 0.062rem;
}
.mt-2 {
margin-top: 0.125rem;
}
...
.marginRight-1 {
margin-right: 0.062rem;
}
...
config_important_input: |
// main.scss
@use "uniform" as * with (
$config: (
important: true
)
);
config_important_output: |
/* main.css */
.align-baseline {
vertical-align: baseline !important;
}
.align-top {
vertival-align: top !important;
}
.align-middle {
vertical-align: middle !important;
}
.align-bottom {
vertival-align: bottom !important;
}
.align-text-top {
vertical-align: text-top !important;
}
.align-text-bottom {
vertical-align: text-bottom !important;
}
...
config_delimiter_input: |
// main.scss
@use "uniform" as * with (
$config: (
delimiter: '--',
pseudo-delimiter: '__',
screen-delimiter: '.',
)
);
config_delimiter_output: |
/* main.css */
.bg--opacity-50 {
--bg-opacity: 0.5;
}
.hover__bg--opacity-50:hover {
--bg-opacity: 0.5;
}
.focus__bg--opacity-50:focus {
--bg-opacity: 0.5;
}
...
@media (min-width: 768px) {
.sm\.text--center {
text-align: center;
}
}
...
config_comma_compression_input: |
// main.scss
@use "uniform" as * with (
$config: (
comma-compression: true
)
);
config_comma_compression_output: |
/* main.css */
.bg-opacity-50,
.focus\.bg-opacity-50:focus,
.group:hover .group-hover\.bg-opacity-50,
.hover\.bg-opacity-50:hover {
--bg-opacity: 0.5;
}
.bg-opacity-55,
.focus\.bg-opacity-55:focus,
.group:hover .group-hover\.bg-opacity-55,
.hover\.bg-opacity-55:hover {
--bg-opacity: 0.55;
}
.bg-opacity-60,
.focus\.bg-opacity-60:focus,
.group:hover .group-hover\.bg-opacity-60,
.hover\.bg-opacity-60:hover {
--bg-opacity: 0.6;
}
...
config_prefix_input: |
// main.scss
@use "uniform" as * with (
$config: (
prefix: 'u-',
)
);
config_prefix_output: |
/* main.css */
.u-inline {
display: inline;
}
.u-block {
display: block;
}
.u-flex {
display: flex;
}
.u-grid {
display: grid;
}
.u-inline-block {
display: inline-block;
}
.u-inline-flex {
display: inline-flex;
}
...
config_apply_input: |
// main.scss
.parent {
@include apply('p-40 shadow-2xs radius-2xl');
.child {
@include apply('hover.opacity-50 p-24 md.p-64');
}
}
config_apply_output: |
/* main.css */
.parent {
padding: 2.5rem;
box-shadow: var(--shadow-2xs);
border-radius: var(--radius-2xl);
}
.parent .child {
padding: 1.5rem;
}
.parent .child:hover {
opacity: 0.5;
}
@media (min-width: 1024px) {
.parent .child {
padding: 4rem;
}
}
config_api_functions_input: |
// main.scss
.parent {
padding: size(24, 32); // 1.5rem 2.5rem;
background: fill(red-400, .4);
border-radius: radius(lg);
.child {
font-family: font(sans);
font-size: font(lg);
font-weight: font(semibold);
line-height: leading(looser);
}
}
config_api_functions_output: |
/* main.css */
.parent {
padding: 1.5rem 2rem;
background: rgba(var(--red-400), 0.4);
border-radius: var(--radius-lg);
}
.parent .child {
font-family: var(--font-sans);
font-size: var(--font-lg);
font-weight: var(--semibold);
line-height: var(--leading-looser);
}
config_helpers_input: |
// main.scss
.element {
font-size: rem(11);
@include screen(sm) {
font-size: rem(13);
}
@include screen(lg) {
font-size: rem(15);
}
}
config_helpers_output: |
/* main.css */
.element {
font-size: 0.687rem;
}
@media (min-width: 768px) {
.element {
font-size: 0.812rem;
}
}
@media (min-width: 1280px) {
.element {
font-size: 0.937rem;
}
}
config_json_input: |
// main.scss
@use "uniform" as * with (
$config: (
output: 'json'
)
);
config_json_output: |
{
"text-decoration": {
"important": "false",
"extra-selector": "",
"responsive": "false",
"pseudos": "hover, group-hover, focus",
"classes": {
"underline": {
"text-decoration": "underline"
},
"line-through": {
"text-decoration": "line-through"
},
"no-underline": {
"text-decoration": "none"
}
}
}
},
...
---
<div
class="fixed xy-0 z-4 flex align-items-center justify-items-center overflow-auto bg-cool-gray-900 bg-opacity-50"
x-cloak
x-show="modal == true"
x-transition:enter.opacity.duration.200ms
>
<!-- Modal inner -->
<div
class="w-100p max-w-896 mx-auto radius-lg overflow-hidden shadow-2xl bg-black"
@click.away="closeModal"
>
<div class='ratio-16-9'>
<iframe class="absolute top-0 left-0 w-100p h-100p js-embedFrame" src="" frameborder="0" allow="autoplay" allowfullscreen></iframe>
</div>
</div>
</div>
<div class="hidden md.block h-20 bg-white">
<!-- spacer -->
</div>
<nav class="fade-in-from-top opacity-0 hidden md.block sticky top-n1 px-32 bg-white relative z-3"
style="--animate-delay: 0.2s; --animate-duration: .6s; --animate-from: -24px;">
<div class="max-w-1152 mx-auto">
<div class="flex align-items-center justify-content-between h-72 mx-auto">
<div class="w-256 flex align-items-center">
<a href="/" class="inline-flex align-items-center text-lg semibold tracking-tight">
<img src="/assets/img/uniform-logo.svg" class="h-24 mr-12"><span class="hidden sm.inline-flex align-items-center px-6 py-2 bg-cool-gray-100 uppercase font-2xs bold tracking-loose radius-sm">{{ metadata.version }}</span>
</a>
</div>
<div class="w-100p max-w-448 group">
<div class="relative text-sm leading-100">
<div class="absolute z-2 top-0 left-0 w-40 h-40 flex align-items-center justify-content-center color-cool-gray-700 font-md">
{% set iconClass = 'fill-current w-16 h-16' %}
{% include "icons/search.njk" %}
</div>
<input type="text" placeholder="Search the docs" class="w-100p h-40 pl-40 pr-48 text-sm radius-lg bg-cool-gray-50 focus.bg-cool-gray-100 color-cool-gray-800 js-docsearch">
<div class="absolute z-2 top-0 right-0 w-48 h-40 flex align-items-center justify-content-center color-cool-gray-500 font-sm medium">
⌘K
</div>
</div>
</div>
<div class="w-256 flex justify-content-end gutter-x-16">
<a href="https://github.com/ThinkUniform/uniformcss" class="flex align-items-center hover.color-indigo-500 transition-100">
{% set iconClass = 'fill-current w-24 h-24' %}
{% include "icons/logo-github.njk" %}
</a>
<a href="https://twitter.com/uniformcss" class="flex align-items-center hover.color-indigo-500 transition-100">
{% set iconClass = 'fill-current w-24 h-24' %}
{% include "icons/logo-twitter.njk" %}
</a>
<a href="https://www.youtube.com/watch?v=5owdoXV_rYM&list=PL9jAsp0Y5-LTA6OOH4LdwDoP_PdqrkUJT" class="flex align-items-center hover.color-indigo-500 transition-100">
{% set iconClass = 'fill-current w-24 h-24' %}
{% include "icons/logo-youtube.njk" %}
</a>
</div>
</div>
</div>
</nav>
<div class="overflow-hidden">
<header>
<div class="relative px-32 sm.text-center">
<div class="max-w-900px pt-56 sm.pt-128 pb-128">
<div class="inline-flex md.hidden align-items-center mb-36 text-xl semibold tracking-tight">
<img src="/assets/img/uniform-logo.svg" class="h-28 mr-12"><span class="inline-flex align-items-center px-6 py-2 bg-cool-gray-100 uppercase font-2xs bold tracking-loose radius-sm">{{ metadata.version }}</span>
</div>
{# <div class="sm.flex justify-content-center mb-28 fade-in opacity-0" style="--animate-delay: .8s;">
<a href="https://www.producthunt.com/posts/uniform-css?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-uniform-css" class="inline-flex align-items-center text-lg semibold tracking-tight">
<img src="/assets/img/featured.svg" class="max-w-192">
</a>
</div> #}
<h1 class="fade-in opacity-0 font-8xl sm.font-11xl md.font-11xl lg.font-11xl leading-110 extrabold m-auto mb-32 tracking-tighter"
style="--animate-delay: .8s;">
<span class="color-indigo-500">Lightning Fast </span><br>Generator for Sass
</h1>
<p class="fade-in opacity-0 text-xl md.text-xl tracking-tight sm.max-w-640 md.max-w-screen-sm sm.mx-auto mb-48 color-cool-gray-600"
style="--animate-delay: .9s;">
Flexible responsive utility class generator and CSS framework designed to help you gain the full power of functional CSS without compromising on Sass.
</p>
<a href="/docs/overview" class="fade-in inline-flex align-items-center h-48 mb-64 px-20 pr-16 border-2 border-black bg-transparent hover.bg-black hover.color-white transition-100 focus.shadow-focus opacity-0 radius-lg semibold text-md"
style="--animate-delay: 1s;">
Read the docs <span class="ml-12">→</span>
</a>
<div class="fade-in opacity-0"
style="--animate-delay: 1.1s;">
<a
class="inline-flex align-items-center color-black font-sm leading-140"
@click="showModal"
>
<div class="relative flex align-items-center justify-content-center w-24 h-24 pl-2 mr-10 radius-full border-1 border-black color-black" style="--border-1 border-cool-gray-100 shadow-2xs: 0 4px 20px 0 rgba(90, 134, 234, 0.3)">
<div class="animate-spin absolute top-0 left-0 w-100p h-100p radius-full" style="animation-duration: 3s;">
<div class="absolute top-0 left-50p transform translate-x-n50p w-4 h-4 mt-n2 bg-black radius-full"></div>
</div>
{% set iconClass = 'fill-current w-12 h-12' %}
{% include "icons/play-sharp.njk" %}
</div>
<div class="text-left">
Why in under 2 minutes
</div>
</a>
</div>
</div>
<div class="ripple">
<div class="ripple__content">
<div class="ripple__one"></div>
<div class="ripple__two"></div>
<div class="ripple__three"></div>
</div>
</div>
</div>
</header>
<div class="block sm.hidden mb-96 sm.mb-160 px-96">
<div class="border-t-4 border-dotted border-cool-gray-100"></div>
</div>
<section class="mb-96 sm.mb-160 fade-in-from-bottom opacity-0 px-32"
style="--animate-delay: 0.2s; --animate-duration: .6s; --animate-from: 24px;">
<div class="flex align-items-center justify-content-center">
<div class="sm.flex align-items-center sm.p-40 sm.shadow-lg sm.radius-2xl">
<div class="flex-none w-96 h-96 sm.w-128 sm.h-128 mx-auto mb-36 sm.mb-0 p-4 radius-xl sm.mr-48 border-1 border-cool-gray-100 shadow-2xs bg-black transform rotate-n12">
<div class="bg-linear radius-xl overflow-hidden transform rotate-12">
<img src="/assets/img/jin.svg" class="w-100p">
</div>
</div>
<div class="text-md text-center sm.text-left max-w-448">
<p class="text-lg mb-20 color-cool-gray-600">"Sass already provides great functionality out of the box. Uniform CSS builds on this strength to help web developers be more productive with the power of immensely flexible utility-first classes."</p>
<div class="text-xs uppercase bold tracking-looser">
— Jin Su Park, Product Designer<a href="https://castle.io" class="color-indigo-500 ml-6">@Castle</a>
</div>
</div>
</div>
</div>
</section>
<div class="block sm.hidden mb-96 sm.mb-160 px-96">
<div class="border-t-4 border-dotted border-cool-gray-100"></div>
</div>
</div>
{% include "partials/sections/get-started.njk" %}
{% include "partials/sections/start-building.njk" %}
{% include "partials/sections/power-features.njk" %}
{% include "partials/sections/enhanced-experience.njk" %}
{% include "partials/sections/easy-setup.njk" %}
<div class="justify-content-center flex align-items-center pt-24 mb-48 carbon-home relative z-2">
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CEAICKQW&placement=uniformcsscom" id="_carbonads_js"></script>
</div>
{% include "partials/footer.njk" %}