-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdocs.html
More file actions
1342 lines (1177 loc) · 58.3 KB
/
docs.html
File metadata and controls
1342 lines (1177 loc) · 58.3 KB
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
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<!-- <html lang="en" data-theme="dark"> -->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="page description" />
<meta name="author" content="Kim Majali" />
<meta name="copyright" content="MIT license, Europe IT Outsourcing, https://www.europeitoutsourcing.com/" />
<title>
Documentation | CSS Vars Framework and UI Kit Free & Open Source
</title>
<!-- Favicons -->
<link rel="apple-touch-icon" href="img/favicons/apple-touch-icon.png" sizes="180x180" />
<link rel="icon" href="img/favicons/favicon-32x32.png" sizes="32x32" type="image/png" />
<link rel="icon" href="img/favicons/favicon-16x16.png" sizes="16x16" type="image/png" />
<link rel="manifest" href="img/favicons/manifest.json" />
<link rel="icon" href="favicon.ico" />
<meta name="msapplication-config" content="img/favicons/browserconfig.xml" />
<meta name="theme-color" content="#FF530D" />
<!-- <link rel="stylesheet" href="css/style.css" /> -->
<link rel="stylesheet" href="css/cssvars.css" />
<link rel="stylesheet" href="css/cssvars-styles.css" />
</head>
<!-- <body class="system-ui-style"> -->
<body>
<div class="main-nav bordered-bottom container-fluid">
<div class="main-menu">
<a href="index.html" id="logo" alt="CSS Vars Framework and UI Kit"><img src="img/logo.png" class="logo" /></a>
<label for="toggle-1" class="toggle-menu">
<svg xmlns="http://www.w3.org/2000/svg" class="icon-color-1-fill icon-s" viewbox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none" />
<path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z" />
</svg>
</label>
<input type="checkbox" id="toggle-1" />
<nav class="nav">
<ul>
<li><a href="docs.html">Documentation</a></li>
<li><a href="elements/elements.html">UI Elements</a></li>
<li><a href="sections/sections.html">Sections</a></li>
<li><a href="themes/themes.html">Themes</a></li>
<li>
<a href="https://github.com/majalinet/Agile-CSS" class="outline-color-1">Download</a>
</li>
</ul>
</nav>
</div>
</div>
<header class="promo-box-s bg-light-grey">
<div class="container">
<h1 class>Documentation</h1>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.html">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">
Documentation
</li>
</ol>
</div>
</header>
<main class="container-fluid row">
<div class="col-lg-2 outline-light-grey p-d-2">
<div class="position-sticky top-0">
<ul class="colored-ul">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#quick-start">Quick Start</a></li>
<li><a href="#theming">Theming</a></li>
<li><a href="#styles">Styles</a></li>
<li><a href="#marginAndPadding">Margin and Padding</a></li>
<li><a href="#grid">Grid</a></li>
<li><a href="#layouts">Layouts</a></li>
<li><a href="#typography">Typography</a></li>
<li><a href="#positions">Positions and Displays</a></li>
</ul>
</div>
</div>
<div class="col-lg-10 p-d-2">
<div>
<h3 id="introduction">Introduction</h3>
<h5>Simplicity, Power, and Performance</h5>
<p>The underlying principle is to offer a CSS framework that is <b>easy to start with and simple to customize</b>. We believe in eliminating unnecessary complexity,
so there are <b>no tools or dependencies</b> required—just a single CSS file to link, and you're ready to go.</p>
<p>By leveraging the power of <b>CSS variables</b>, we give full control over styles and themes, making <b>customization straightforward and flexible</b> without complicated setups.</p>
<p>Unlike many micro CSS frameworks that offer only a grid system, CSS vars framework <b>delivers all the essential UI elements</b> in one lightweight file, ensuring fast loading times and better performance without sacrificing comprehensive design needs.</p>
<p>This approach lets developers focus on creativity and functionality, rather than wrestling with heavy frameworks or build tools.
</p>
<h5 class="m-t-4">Core Principles</h5>
<strong>Simplicity</strong>
<p>No complex setups or heavy configs. Just link one CSS file and start designing with easy-to-use CSS variables.</p>
<strong>Power</strong>
<p>Access hundreds of free and customizable UI elements – from complete layouts and typography to advanced icons and interactive components. Create rich experiences with just HTML and CSS.</p>
<strong>Performance</strong>
<p>With no dependencies, a minuscule file size ensures rapid loading times, enhancing user experience, mobile performance, SEO, and conversions.</p>
<h5 class="m-t-4">Core Features</h5>
<ul>
<li class="m-b-1"><strong> CSS Variables Based</strong><br>
Simple to implement and modify. Set your styles simply by adjusting variables and using ready-made classes.
</li>
<li class="m-b-1"><strong> Instant Integration</strong><br>
Just link one CSS file. No npm install, webpack configuration, build scripts, nor package.json setup.
</li>
<li class="m-b-1"><strong> Pure HTML CSS</strong><br>
All web site elements without JS. It's built for better performance purposes, all common UI elements
</li>
<li class="m-b-1"><strong> Fast Loading</strong><br>
A small CSS file makes wonders. Just 10kb (minified + gzipped), including the UI kit code
</li>
<li class="m-b-1"><strong> Scoped CSS</strong><br>
Can be used with other frameworks. It can be used, as a framework and a library. Works with other frameworks
</li>
<li class="m-b-1"><strong> Responsive & Mobile first</strong><br>
Much more than just a grid. Responsive images, videos, galleries, tables, menus, maps, frames, embeds
</li>
<li class="m-b-1"><strong> All Popular Styles</strong><br>
Apply by adding one class, any of the most 20 web design styles: minimalist, modern, material, flat, brutal, glass, retro, neon, cyberpunk, luxury, playful, modular, system-ui, and more.
</li>
<li class="m-b-1"><strong> Themes</strong><br>
14 themes, to change theme change the variables in the CSS file, you can choose one of the pre-built themes, or change the variables to match your needs
</li>
<li class="m-b-1"><strong> Dark & Light Themes</strong><br>
Pre-built dark & light themes and you can enable auto detect theme switcher based on the user's browser settings
</li>
<li class="m-b-1"><strong> 100's of Free UI Elements</strong><br>
All needed elements are ready. Typography, buttons, cards, icons, tabs, carousel, masonry, Flex gallery ...
</li>
<li class="m-b-1"><strong> Icons Included</strong><br>
Advanced styles for SVG icons. Add and style SVG icons without icon libraries, still can use libraries.
</li>
<li class="m-b-1"><strong> Free & Open Source</strong><br>
Built with love to be used. Free framework, UI elements, & themes. Download, use, enjoy & share
</li>
</ul>
<h6 class="m-t-4">CSS Vars Framework Comparison against Popular CSS Frameworks</h6>
<div class="auto-overflow-x">
<table class="table" >
<thead>
<tr>
<th>Feature</th>
<th>CSS Vars Framework</th>
<th>Bootstrap</th>
<th>Tailwind CSS</th>
<th>Bulma</th>
<th>Foundation</th>
</tr>
</thead>
<tbody>
<tr>
<td>File Size (min+gz)</td>
<td>~10KB <br>⭐⭐⭐⭐⭐</td>
<td>~140KB (CSS + JS) <br>⭐⭐</td>
<td>Highly variable <br>⭐⭐⭐</td>
<td>~30KB <br>⭐⭐⭐⭐</td>
<td>~60KB (CSS only) <br>⭐⭐⭐</td>
</tr>
<tr>
<td>Dependencies/Tools</td>
<td>None (link one CSS file) <br>⭐⭐⭐⭐⭐</td>
<td>jQuery, npm, Webpack often <br>⭐⭐</td>
<td>npm, PostCSS, config files <br>⭐⭐⭐</td>
<td>npm, Sass compiler <br>⭐⭐⭐</td>
<td>jQuery, npm, Grunt/Gulp <br>⭐⭐</td>
</tr>
<tr>
<td>Customization</td>
<td>Easy via CSS variables <br>⭐⭐⭐⭐⭐</td>
<td>Sass variables, overrides <br>⭐⭐⭐</td>
<td>Config files, utility classes <br>⭐⭐⭐⭐</td>
<td>Sass variables, overrides <br>⭐⭐⭐</td>
<td>Sass variables, overrides <br>⭐⭐⭐</td>
</tr>
<tr>
<td>Approach</td>
<td>Component-based, ready-made UI <br>⭐⭐⭐⭐</td>
<td>Component-based, opinionated <br>⭐⭐⭐⭐</td>
<td>Utility-first, flexible <br>⭐⭐⭐⭐⭐</td>
<td>Component-based, modern <br>⭐⭐⭐⭐</td>
<td>Component-based, enterprise <br>⭐⭐⭐⭐</td>
</tr>
<tr>
<td>JavaScript Req.</td>
<td>None (Pure HTML/CSS) <br>⭐⭐⭐⭐⭐</td>
<td>Required for components <br>⭐⭐</td>
<td>None (but often used with JS) <br>⭐⭐⭐⭐</td>
<td>None <br>⭐⭐⭐⭐⭐</td>
<td>Required for components <br>⭐⭐</td>
</tr>
<tr>
<td>Performance Focus</td>
<td>High (small size, no JS) <br>⭐⭐⭐⭐⭐</td>
<td>Moderate <br>⭐⭐⭐</td>
<td>High (if properly purged) <br>⭐⭐⭐⭐</td>
<td>Good <br>⭐⭐⭐⭐</td>
<td>Moderate <br>⭐⭐⭐</td>
</tr>
<tr>
<td>UI Elements Incl.</td>
<td>100s of pre-built elements <br>⭐⭐⭐⭐⭐</td>
<td>Comprehensive set <br>⭐⭐⭐⭐⭐</td>
<td>Build from utilities <br>⭐⭐⭐</td>
<td>Good set <br>⭐⭐⭐⭐</td>
<td>Good set <br>⭐⭐⭐⭐</td>
</tr>
<tr>
<td>Icon Support</td>
<td>Built-in SVG styling <br>⭐⭐⭐⭐⭐</td>
<td>Requires external libraries <br>⭐⭐⭐</td>
<td>Requires external libraries <br>⭐⭐⭐</td>
<td>Requires external libraries <br>⭐⭐⭐</td>
<td>Requires external libraries <br>⭐⭐⭐</td>
</tr>
<tr>
<td>Learning Curve</td>
<td>Low (intuitive, standard CSS) <br>⭐⭐⭐⭐⭐</td>
<td>Moderate <br>⭐⭐⭐</td>
<td>Moderate to High <br>⭐⭐</td>
<td>Low to Moderate <br>⭐⭐⭐⭐</td>
<td>Moderate to High <br>⭐⭐⭐</td>
</tr>
<tr>
<td>Ecosystem/Community</td>
<td>Growing <br>⭐⭐⭐</td>
<td>Very Large, mature <br>⭐⭐⭐⭐⭐</td>
<td>Large, very active <br>⭐⭐⭐⭐⭐</td>
<td>Moderate <br>⭐⭐⭐</td>
<td>Moderate to Large <br>⭐⭐⭐⭐</td>
</tr>
<tr>
<td>Integration</td>
<td>Instant, works with others <br>⭐⭐⭐⭐⭐</td>
<td>Typically standalone <br>⭐⭐⭐</td>
<td>Usually standalone <br>⭐⭐⭐</td>
<td>Can be integrated <br>⭐⭐⭐⭐</td>
<td>Typically standalone <br>⭐⭐⭐</td>
</tr>
<tr>
<td>Setup Time</td>
<td>Instant <br>⭐⭐⭐⭐⭐</td>
<td>Quick but requires planning <br>⭐⭐⭐</td>
<td>Requires initial configuration <br>⭐⭐</td>
<td>Quick <br>⭐⭐⭐⭐</td>
<td>Requires planning <br>⭐⭐⭐</td>
</tr>
<!-- <tr>
<td><strong>Overall Score</strong></td>
<td><strong>⭐⭐⭐⭐⭐ (58/60)</strong></td>
<td><strong>⭐⭐⭐ (38/60)</strong></td>
<td><strong>⭐⭐⭐⭐ (42/60)</strong></td>
<td><strong>⭐⭐⭐⭐ (47/60)</strong></td>
<td><strong>⭐⭐⭐ (37/60)</strong></td>
</tr> -->
</tbody>
</table>
</div>
<h6 class="m-t-4">When to Use CSS Vars Framework</h6>
<ul>
<li class="m-b-1"><strong>Performance is critical</strong>:<br> Ideal for fast-loading sites like blogs, portfolios, or web aps targeting perfect Lighthouse scores, especially on mobile or slow networks.</li>
<li class="m-b-1"><strong>You prefer simple setup</strong>:<br> No build tools, no npm installs, no JavaScript dependencies—just link one CSS file and start styling immediately.</li>
<li class="m-b-1"><strong>Easy theming is needed</strong>:<br> Easily customise design tokens like colours or spacing and support multiple themes without advanced configuration.</li>
<li class="m-b-1"><strong>You want a complete UI kit in one place</strong>:<br> Instead of using multiple libraries or heavy frameworks, CSS Vars includes all key UI elements out of the box.</li>
<li class="m-b-1"><strong>You want pure HTML and CSS components</strong>:<br> When JavaScript-free UI is important for performance, accessibility, or simplicity.</li>
<li class="m-b-1"><strong>You’re adding to existing projects</strong>:<br> Scoped styles ensure seamless integration with other frameworks or legacy code.</li>
<li class="m-b-1"><strong>You want low learning curve</strong>:<br> Familiar CSS syntax makes it easy for anyone with basic CSS knowledge to adopt quickly.</li>
</ul>
<h6 class="m-t-4">Consider Other Frameworks when</h6>
<ul>
<li class="m-b-1"><strong>Bootstrap</strong>:<br> Ideal for rapid development with a wide array of pre-built UI components and strong third-party support. Great for teams already familiar with it and large-scale or enterprise apps.</li>
<li class="m-b-1"><strong>Tailwind CSS</strong>:<br> Choose it when you want full styling control using utility classes and have a strong design system. Best for custom UIs and developers comfortable with build tools.</li>
<li class="m-b-1"><strong>Foundation</strong>:<br> Go with it for enterprise-grade apps needing powerful grids, accessibility, and advanced UI components. Ideal for large, complex, and scalable projects.</li>
<li class="m-b-1"><strong>Bulma</strong>:<br> Use it for modern, semantic CSS-only development with clean design and Flexbox layout. Suitable when you want to add JS yourself and value simplicity.</li>
<li class="m-b-1"><strong>Materialize</strong>:<br> Best when building apps in React, Vue, or Angular that follow Material Design or require consistent, framework-specific UI components.</li>
</ul>
</div>
<div>
<h3 id="quick-start" class="m-t-4">Quick Start</h3>
CSS Vars Framework, the small CSS file that makes wonders. 100's of
UI elements to build light-weight HTML pages fast and for free
<div>
The best way to add Agile CSS Framework to your project is to
download the CSS file and link to it in your HTML page header
<div class="msg bga-color-1 m-v-1">No NPM install, webpack configuration, build scripts, task runners, nor Sass needed</div>
<h5 class="m-t-2">Download</h5>
Please click the link to
<a href="http://cssvars.com/cssvars-download.zip" target="_blank" rel="noopener noreferrer" download="cssvars.css">download the CSS file</a> or
<h5 class="m-t-2">CDN</h5>
<p>
Or use or CDN link, copy-paste the stylesheet into your head before
all other stylesheets to load our CSS.
</p>
<script src="https://gist.github.com/majalinet/3df6442c68c98da21694ee415372bf3c.js"></script>
<h5>Start Page</h5>
<p>Use this code to start a page from scarch</p>
<script src="https://gist.github.com/majalinet/5420cdb44f72b2faa6ac87cfddb82c44.js"></script>
</div>
<div class="m-v-4">
<h3 id="theming">Theming</h3>
<p>CSS Vars Framework comes a basic set of CSS variables:</p>
<script src="https://gist.github.com/majalinet/3bdbfb7596c9138e2959adb42a72b806.js"></script>
<h5>Colors</h5>
<p>
Change the colors variables to match your brand color, color-1 is
the primary color. You might need to add the class <b>white</b> to make the text in white color
</p>
<div class="row">
<div class="col bg-color-1 white m1 p2">bg-color-1</div>
<div class="col bg-color-2 white m1 p2">bg-color-2</div>
<div class="col bg-color-gradient white m1 p2">bg-color-gradient</div>
<div class="col bg-danger white m1 p2">bg-danger</div>
</div>
<div class="row">
<div class="col bg-success white m1 p2">bg-success</div>
<div class="col bg-info white m1 p2">bg-info</div>
<div class="col bg-grey m1 p2">bg-grey</div>
<div class="col bg-dark white m1 p2">bg-dark</div>
</div>
<div>
<div class="row">
<div class="col bga-color-1 m1 p2">bga-color-1</div>
<div class="col bga-color-2 m1 p2">bga-color-2</div>
<div class="col bg-light-grey m1 p2">bg-light-grey</div>
<div class="col bga-danger m1 p2">bga-danger</div>
</div>
<div class="row">
<div class="col bga-success m1 p2 ">bga-success</div>
<div class="col bga-info m1 p2">bga-info</div>
<div class="col bga-grey m1 p2">bga-grey</div>
<div class="col bga-dark m1 p2">bga-dark</div>
</div>
<h5 class="m-t-2">Background Colors on Hover</h5>
Background Color:</span> <b>bg-color-1-hover bg-color-2-hover bg-black-hover bg-white-hover bg-dark-hover
bg-danger-hover bg-success-hover bg-info-hover</b><br>
Color & Background Color:</span> <b>bga-color-1-hover bga-color-2-hover bga-black-hover bga-white-hover
bga-dark-hover bga-danger-hover bga-success-hover bga-info-hover</b>
<h5 class="m-t-2">Contextual Text</h5>
<p>
Use the contextual text classes to provide "meaning through
colors":
</p>
<p>
You can color texts using the ready classes
<b>color-1, color-2, info, success, danger, dark, black, white</b>
</p>
<p class="color-1">color-1 This text is important.</p>
<p class="color-2">color-2 This text is important.</p>
<p class="success">success This text indicates success.</p>
<p class="info">info This text represents some information.</p>
<p class="danger">danger This text represents danger.</p>
<p class="color-gradient">color-2 This text is important.</p>
<p class="dark">dark This text represents normal text.</p><br>
<h5>Contextual text classes on hover</h5>
<p>You can add color-hover classes to change the color on hover, try hovering on the classes below<br>
<b class="color-1-hover">color-1-hover</b>
<b class="color-2-hover">color-2-hover</b>
<b class="success-hover">success-hover</b>
<b class="info-hover">info-hover</b>
<b class="danger-hover">danger-hover</b>
<b class="dark-hover">dark-hover</b>
<b class="white-hover">white-hover</b>
<b class="color-gradient-hover">color-gradient-hover</b></p>
<div class="m-v-2">
<h5 class="m-t-2">Sizes</h5>
<ul class="colored-ul">
<li>
Changing the values of <b>--font-size-mobile</b> and
<b>--font-size-desktop</b> will change the font sizes of all
text elements.
</li>
<li>That also will change margin and padding values.</li>
<li>
Changing the values of <b>--fontweight</b> will set font
weight of most of text elements.
</li>
<li>
Changing the values of <b>--fontweight-heading</b> will set
default font weight of h1-h6 elements and classes.
</li>
</ul>
</div>
<div id="styles" class="m-t-4">
<h3>Styles</h3>
<p>
Themes handle your brand's core colors and fonts. Styles, however, offer a broader design application, allowing you to choose from over 20 well-known web design aesthetics such as minimalist, modern, material, flat, brutal, glass, retro, neon, cyberpunk, luxury, playful, modular, and system-ui.
</p>
<h6>How to use styles</h6>
<p>
To apply a style, simply add <b>the style class code to your body element</b>. For example, to apply the <b>brutalism</b> style, add the class <b>brutalism-style</b> to your element.
</p>
<p>
<b>Copy the class code</b> from the styles file <a href="https://github.com/majalinet/cssvars/blob/master/css/cssvars-styles.css">CSSvars styles</a> file and add it to your CSS file, or your HTML code if you use CDN, you can also link to the file if you want to use multiple styles.
</p>
<ul class="colored-ul">
<li class="m-b-1"><b>Brutalism (Anti-Design)</b><br>
Brutalism: Use for bold, disruptive designs that reject traditional aesthetics.<br>
Art studios, personal brands, underground music, radical startups.
</li>
<li class="m-b-1"><b>Glassmorphism</b><br>
Glassmorphism: Best for modern, elegant UIs with frosted-glass visuals.<br>
Fintech, health tech, luxury apps, personal productivity tools.
</li>
<li class="m-b-1"><b>Retro & Vintage</b><br>
Retro/Vintage: Ideal for nostalgic, playful, or thematic branding.<br>
Coffee shops, vintage clothing, lifestyle blogs, creative agencies.
</li>
<li class="m-b-1"><b>Minimalist</b><br>
Minimalist: Perfect for clean, distraction-free content or portfolios.<br>
Tech startups, SaaS platforms, portfolios, architects, wellness brands.
</li>
<li class="m-b-1"><b>Neon</b><br>
Neon: Use in high-energy or futuristic entertainment/tech projects.<br>
Nightclubs, gaming platforms, youth fashion, media streaming.
</li>
<li class="m-b-1"><b>Cyberpunk</b><br>
Cyberpunk: Great for edgy, tech-heavy or sci-fi-inspired UIs.<br>
Blockchain/crypto apps, game dev studios, hacker culture brands.
</li>
<li class="m-b-1"><b>High Contrast</b><br>
High Contrast: Essential for accessibility or information-heavy UIs.<br>
Government sites, accessibility-first platforms, education.
</li>
<li class="m-b-1"><b>Luxury</b><br>
Luxury: Use for high-end brands needing elegance and sophistication.<br>
Luxury goods, high-end services, fashion, jewelry.
</li>
<li class="m-b-1"><b>Neumorphism (Soft UI)</b><br>
Neumorphism: Use for soft, tactile interfaces—best in moderation.<br>
IoT dashboards, smart home apps, lifestyle tools (in moderation).
</li>
<li class="m-b-1"><b>Modern / Flat UI</b><br>
Flat 2.0: Use for clean, intuitive UIs with subtle depth cues.<br>
Fintech apps, e-commerce admin, task managers.
</li>
<li class="m-b-1"><b>Playful / Creative</b><br>
Best for fun, friendly, and energetic interfaces with expressive visuals and lively colours.<br>
Kids’ apps, creative studios, learning platforms, lifestyle blogs, and quirky e-commerce brands.
</li>
<li class="m-b-1"><b>Material Design</b><br>
Ideal for clean, structured, and responsive interfaces based on Google’s design principles.<br>
SaaS platforms, productivity tools, fintech apps, government portals, and educational platforms.
</li>
<li class="m-b-1"><b>Modular / Card-Based UI</b><br>
Dashboard/Modular: Ideal for admin panels with widget/card layouts.<br>
CRMs, HR systems, ERP tools, SaaS dashboards.
</li>
<li class="m-b-1"><b>Flat 2.0</b><br>
Data-Driven: Best for analytics-heavy or chart-rich dashboards.<br>
Fintech apps, e-commerce admin, task managers.
</li>
<li class="m-b-1"><b>Data-Driven / Analytical</b><br>
Data-Driven: Best for analytics-heavy or chart-rich dashboards.<br>
Analytics platforms, BI tools, performance monitoring.
</li>
<li class="m-b-1"><b>Enterprise / Functional</b><br>
Enterprise: Built for dense data tables and power-user workflows.<br>
B2B SaaS, legal/accounting tools, logistics & finance software.
</li>
<li class="m-b-1"><b>System UI (OS-Like UI)</b><br>
System UI: Mimics desktop apps; great for dev tools or OS-like apps.<br>
Developer tools, code platforms, internal IT tools.
</li>
<li class="m-b-1"><b>Colorful Dashboard</b><br>
Colorful Dashboard: Use to bring energy to user dashboards and KPIs.<br>
Health tech, education, fitness tracking apps.
</li>
</ul>
</div>
<div class="m-t-4">
<h3 id="marginAndPadding">Margin and Padding</h3>
<p>
Add margin and padding classes to set the required space between
elements, please note that numbers are referring to rem which is
the default font size.
</p>
<ul class="colored-ul">
<li><b>Formula:</b> We use <b>{p/m} {/-v-/-h-/-t-/-b-/-l-/-r-} {value}</b></li>
<li><b>Orientation:</b> -v- vertical, -h- horizontal, -t- top, -b- bottom, -l- left, -r- right</li>
<li><b>Values:</b> 0, 1, 2, 3, 4 are spacing values by rem, -1-16, -1-8, -1-4, -1-2, -3-4 is 1 rem divided by the value</li>
<li><b>Notes:</b><ul class="colored-ul">
<li><b>(two dashes) m-t-1</b> instead of mt-1, this increases readability, scalability, and the ease of maintenance.</li>
<li><b>(v/h) m-v-1</b> instead of (x/y) my-1, It mirrors CSS's logical properties, ensures adaptability. It's more future-proof, internationally friendly, and semantically clearer!</li>
</ul>
</li>
</ul>
<h6>Margin</h6>
<ul class="colored-ul">
<li>
Add the classes <b>m0, m-1-16(1/16 rem), m-1-8, .m-1-4, .m-1-2, .m-3-4, m1(1rem), m2, m3, m4</b> to increase or remove margin
</li>
<li>
Add the classes <b>m-v-0, m-v--1-16, m-v--1-8, .m-v--1-4, .m-v--1-2, .m-v--3-4, m-v-1, m-v-2, m-v-3, m-v-4</b> to increase top and bottom margin
</li>
<li>
Add the classes <b>m-h-0, m-h--1-16, m-h--1-8, .m-h--1-4, .m-h--1-2, .m-h--3-4, m-h-1, m-h-2, m-h-3, m-h-4</b> to increase left and right margin
</li>
<li>
Add the classes <b>m-t-0, m-t--1-16, m-t--1-8, .m-t--1-4, .m-t--1-2, .m-t--3-4, m-t-1, m-t-2, m-t-3, m-t-4</b> to increase top margin only
</li>
<li>
Add the classes <b>m-b-0, m-b--1-16, m-b--1-8, .m-b--1-4, .m-b--1-2, .m-b--3-4, m-b-1, m-b-2, m-b-3, m-b-4</b> to increase bottom margin only
</li>
<li>
Add the classes <b>m-d-1, m-d-2</b> to increase margin on desktop devices only
</li>
<li>Add the classes <b>m-auto, m-h-auto, m-v-auto</b> for auto margin and centreing contents</li>
</ul>
<h6>Padding</h6>
<ul class="colored-ul">
<li>
Add the classes <b>p0, p-1-16(1/16 rem), p-1-8, .p-1-4, .p-1-2, .p-3-4, p1(1rem), p2, p3, p4</b> to
increase or remove padding
</li>
<li>
Add the classes <b>p-v-0, p-v--1-16, p-v--1-8, .p-v--1-4, .p-v--1-2, .p-v--3-4, p-v-1, p-v-2, p-v-3, p-v-4</b> to
increase top and bottom padding
</li>
<li>
Add the classes <b>p-h-0, p-h--1-16, p-h--1-8, .p-h--1-4, .p-h--1-2, .p-h--3-4, p-h-1, p-h-2, p-h-3, p-h-4</b> to increase left and right padding
</li>
<li>
Add the classes <b>p-t-0, p-t--1-16, p-t--1-8, .p-t--1-4, .p-t--1-2, .p-t--3-4, p-t-1, p-t-2, p-t-3, p-t-4</b> to increase top padding only
</li>
<li>
Add the classes <b>p-b-0, p-b--1-16, p-b--1-8, .p-b--1-4, .p-b--1-2, .p-b--3-4, p-b-1, p-b-2, p-b-3, p-b-4</b> to increase bottom padding only
</li>
<li>
Add the classes <b>p-d-1, p-d-2</b> to increase
padding on desktop devices only
</li>
</ul>
</div>
</div>
</div>
<div class="m-v-4">
<h3 id="grid">Grid</h3>
<p>
CSS Vars Framework has mobile-first flexbox grid, twelve column
system.
</p>
<ul class="colored-ul">
<li class="text-lowercase">
Create a div and add the class <b>row</b>.
</li>
<li>
Inside this div, create divisions and add the class <b>col</b>
</li>
</ul>
<div class="row m-v-1">
<div class="col outline-color-1">1 of 2 <b>.col</b></div>
<div class="col outline-color-1">2 of 2 <b>.col</b></div>
</div>
<script src="https://gist.github.com/majalinet/fc7935b863c6771c139f46c804a81003.js"></script>
<h5>Setting columns width</h5>
<p>add <b>col-</b> with a number from 1 to 12 to set the size</p>
<div class="row m-v-1">
<div class="col-8 outline-color-1">1 of 2 <b>.col-8</b></div>
<div class="col-4 outline-color-1">2 of 2 <b>.col-4</b></div>
</div>
<script src="https://gist.github.com/majalinet/05aff8ac35f77665fb0306cb3c727367.js"></script>
<h5>Setting columns different width for different devices</h5>
<p>
Use <b>col-sm- col-md- col-lg- col-xl-</b> with any number from 1 to
</p>
The sum in each row must be 12,
<ul class="colored-ul">
<li><b>-12</b> will make a single column</li>
<li><b> -6 -6</b> a rwo of two equal columns</li>
<li><b>-3 -6 -3</b> a row of three columns not equal in size</li>
</ul>
<p>
<b>Example:</b><br />
<b>col-sm-12</b> shows a full width column on small devices,
<b>col-md-6</b> shows 2 columns on tablets, <b>col-lg-3</b> shows 4
columns on desktop<br />
Please, resize the window to see the chanages on all devices.
</p>
<div class="row m-v-1">
<div class="col-sm-12 col-md-6 col-lg-3 outline-color-1">
1 of 4 <b>col-sm-12 col-md-6 col-lg-4</b>
</div>
<div class="col-sm-12 col-md-6 col-lg-3 outline-color-1">
2 of 4 <b>col-sm-12 col-md-6 col-lg-4</b>
</div>
<div class="col-sm-12 col-md-6 col-lg-3 outline-color-1">
3 of 4 <b>col-sm-12 col-md-6 col-lg-4</b>
</div>
<div class="col-sm-12 col-md-6 col-lg-3 outline-color-1">
4 of 4 <b>col-sm-12 col-md-6 col-lg-4</b>
</div>
</div>
<script src="https://gist.github.com/majalinet/74601b3161989c79bfc186f160468a41.js"></script>
<h5>Reorder columns on different devices</h5>
<p>
In smoe cases we need to show a column first on large devices but
last on small devices or visa versa
</p>
<ul class="colored-ul">
<li>
<b>lg-order-first</b> will show a column first on large devices
</li>
<li>
<b>lg-order-last</b> will show a column last on large devices
</li>
</ul>
<div class="row m-v-1">
<div class="col-sm-12 col-lg-8 outline-color-1">
1 of 2 <b>col-sm-12 col-lg-8</b>
</div>
<div class="col-sm-12 col-lg-4 outline-color-1 lg-order-first">
1 of 2 <b>first on large devices 2nd on small devices</b>
</div>
</div>
<script src="https://gist.github.com/majalinet/547aa2cac7d87581baed06f9642cc1b3.js"></script>
</div>
<div class="m-v-2">
<h3>Relative Width and Height</h3>
<ul class="colored-ul">
<li>Add the class <b>w-25 w-50 w-75 w-100 </b> to set the width of any div based on the user view</li>
<li>Add the class <b>h-25 h-50 h-75 h-100 h-150</b> to set the height of any div based on the user view</li>
</ul>
<div class="msg bga-color-1"><b>Note</b> these classes could be applied to any element</div>
</div>
<div class="m-t-4">
<h3 id="layouts">Layouts</h3>
<ul class="colored-ul">
<li>Add the class <b>container</b> to get boxed division</li>
<li>Add the class <b>container-fluid</b> to get a wide division</li>
<li>Add the class <b>container-half-fluid</b> to get a wide division but on screens bigger than 1200px
max-width will be 85%</li>
<li>Add <b>no classes</b> to get full width division</li>
</ul>
<p>Use the code below to get a page layout suits your needs</p>
<script src="https://gist.github.com/majalinet/93e3bcd8ccb818d286a45f8e71fa24cd.js"></script>
</div>
<div class="m-v-4">
<h3 id="typography">Typography</h3>
<ul class="colored-ul">
<li>
Changing the variables <b>color-1</b> will change the colors of
all Heading elements
</li>
<li>
You can color texts using the ready classes
<b>color-1, color-2, info, success, danger, dark, black, white</b>
</li>
<li>
You can highlight text using the ready classes
<b>color-1, color-2, bg-color-gradient, bg-success, bg-info,
bg-danger, bg-dark, bg-light-grey</b>
</li>
<li>
You can outine text using the ready classes
<b>outline-color-1, outline-color-2, outline-color-dark,
outline-color-grey, outline-color-info, outline-color-success,
outline-color-danger, outline-light-grey</b>
</li>
<li>
Add the classes <b>font-weight-200, font-weight-400, font-weight-600, bold</b> to
change font weight
</li>
<li>
Add the classes to make test smaller <b><span class="smaller">smaller</span> <span
class="small">small</span> <span class="extra-small">extra-small</span></b>
</li>
</ul>
<div class="m-v-4">
<h5>Headings</h5>
<p>
You use the elemnts h1-h6 or uses there classes any apply on any
other text element<b>h1, h2, h3, h4, h5, h6</b>
</p>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
<div class="heading-box">
<h3 class="bordered">Bordered Title</h3>
</div>
<div class="heading-box">
<h3 class="bordered-top">Top Bordered Title</h3>
</div>
<div class="heading-box">
<h3 class="bordered-bottom">Bottom Bordered Title</h3>
</div>
<div class="fancy-title title-center title-dotted-border topmargin">
<h3>Fancy Title</h3>
</div>
<h1 class="short-line">Short line</h1>
</div>
<div class="m-v-4">
<h5>Display</h5>
<p>
You display classes for bigger text without giving semantic
meaning
<b>display-1, display-2, display-3, display-4, display-5,
display-6</b>
</p>
<p class="display-1">Display 1</p>
<p class="display-2">Display 2</p>
<p class="display-3">Display 3</p>
<p class="display-4">Display 4</p>
<p class="display-5">Display 5</p>
<p class="display-6">Display 6</p>
<p class="display-4 color-gradient">gradient effect</p>
</div>
<div class="m-v-4">
<h5>Contextual Backgrounds</h5>
<p>
You can color texts using the ready classes
<b>color-1, color-2, info, success, danger, dark, black, white</b>. You can add the class
<b>d-inline-block</b> to make text
display inline block
</p>
<p class="bg-color-1 white">bg-color-1 This text is important.</p>
<p class="bg-color-2 white">bg-color-2 This text is important.</p>
<p class="bg-color-gradient white">
bg-color-gradient This text is important.
</p>
<p class="bg-success white">bg-success This text indicates success.</p>
<p class="bg-info white">
bg-info This text represents some information.
</p>
<p class="bg-danger with d-inline-block white">
bg-danger This text represents danger with d-inline-block.
</p>
<p class="bg-grey black d-inline-block white">
bg-grey black on grey with d-inline-block.
</p>
<p class="bg-dark d-inline-block white">
bg-dark white on dark with d-inline-block.
</p>
<p class="bga-color-1">
bga-color-1
</p>
<p class="bga-color-2">
bga-color-2
</p>
<p class="bga-danger">
bga-danger
</p>
<p class="bga-success">
bga-color-success
</p>
<p class="bga-info">
bga-color-info
</p>
<p class="bg-light-grey">
bg-light-grey
</p>
<p class="bga-grey">
bga-grey
</p>
<p class="bga-dark">
bga-dark
</p>
</div>
<div class="m-v-4">
<h5>Contextual text</h5>
<p>
You can color texts using the ready classes
<b>color-1, color-2, info, success, danger, dark, black, white</b>
</p>
<p class="color-1">color-1 This text is important.</p>
<p class="color-2">color-2 This text is important.</p>
<p class="success">success This text indicates success.</p>
<p class="info">info This text represents some information.</p>
<p class="danger">danger This text represents danger.</p>
<p class="color-gradient">color-2 This text is important.</p>
<p class="dark">dark This text represents normal text.</p>
<h5>Contextual text classes on hover</h5>
<p>You can add color-hover classes to change the color on hover try hovering on the classes below</p>
<b class="color-1-hover">color-1-hover</b>
<b class="color-2-hover">color-2-hover</b>
<b class="success-hover">success-hover</b>
<b class="info-hover">info-hover</b>
<b class="danger-hover">danger-hover</b>
<b class="dark-hover">dark-hover</b>
<b class="white-hover">white-hover</b>
<b class="color-gradient-hover">color-gradient-hover</b>
</div>
<div class="m-v-4">
<h5>Outlined text</h5>
<p>
You can outline text using the ready classes
<b>outline-color-1, outline-color-2, outline-color-dark,
outline-color-grey, outline-color-info, outline-color-success,
outline-color-danger, outline-light-grey</b>. You can add the class <b>d-inline-block</b> to make text
display inline block.
</p>
<p class="outline-color-1">outline-color-1</p>
<p class="outline-color-1 color-1 d-inline-block">
outline-color-1 with class d-inline-block
</p>
<p class="outline-color-2 color-2 d-inline-block">
outline-color-2 with class d-inline-block
</p>
<p class="outline-color-success success d-inline-block">
outline-color-success with class d-inline-block
</p>
<p class="outline-color-info info d-inline-block">
outline-color-info with class d-inline-block
</p>
<p class="outline-color-danger danger d-inline-block">
outline-color-danger with class d-inline-block
</p>
<p class="outline-color-dark dark d-inline-block">
outline-color-dark with class d-inline-block
</p>
</div>
<div class="m-v-4">
<h5>Heading class</h5>
<p>
You can apply the heading style on any text element using the classes
<b>.heading</b> to apply all heading styles or individually <b>heading-color, heading-font, heading-font-weight,
heading-line-height, heading-letter-spacing</b>.
</p>
</div>
<div class="m-v-4">
<h5>Text Formatting and Transformation</h5>
<p>Add the following classes on any text element</p>
<ul class="colored-ul">
<li class="text-lowercase"><b>text-lowercase</b> Lowercased text.</li>
<li><b>text-uppercase</b> <span class="text-uppercase">Uppercased text.</span></li>
<li><b>text-capitalize</b> <span class="text-capitalize">Capitalized text.</span></li>
<li class="old-info"><b>old-info</b> to get line through text.</li>
<li class="overline"><b>overline</b> to get line over text.</li>
<li class="underline"><b>underline</b> to get line under text.</li>
<li class="italic"><b>italic</b> to get the text italic.</li>
<li>Add the classes <span class="font-thin">font-thin</span>, <span class="font-regular">font-regular</span>, <span class="font-semibold">font-semibold</span>, <span class="bold">bold</span> to change font weight</li>
<li class="letter-spacing-1">Add classes <b><span class="letter-spacing-0">letter-spacing-0</span>, <span class="letter-spacing-1">letter-spacing-1</span>, <span class="letter-spacing-1">letter-spacing-2</span></b> to add and remove letter spacing.</li>
<li><b><span class="double">double</span>, <span class="large">large</span>, <span class="larger">larger</span>,<span class="smaller">smaller</span>, <span class="small">small</span>, <span class="half">half</span></b> to change size.</li>
<li class="unselectable"><b>unselectable</b> to make text unselectable.</li>
<li class="justified"><b>justified</b> justified aligned text.</li>
<li class="left"><b>left</b> left aligned text.</li>
<li class="center"><b>center</b> centered text.</li>
<li class="right"><b>right</b> right aligned text.</li>
</ul>
</div>
<div class="m-v-4">
<h5>Ordered/Unordered Lists</h5>
<div class="row">
<div class="col-12 col-lg-4">
Add the class <b>colored-ul</b> to the ul element
<ul class="colored-ul">
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
</ul>
</div>
<div class="col-12 col-lg-4">
Add the class <b>indent-ul</b> to the ul element
<ul class="indent-ul">
<li>List Item</li>
<li>List Item</li>
</ul>
Add the class <b>half-indent-ul</b> to the ul element
<ul class="half-indent-ul">
<li>List Item</li>
<li>List Item</li>
</ul>
</div>
<div class="col-12 col-lg-4">
Add the class <b>no-indent-ul</b> to the ul element
<ul class="no-indent-ul">
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
</ul>
</div>
</div>
<div class="row">
<div class="col-12 col-lg-4">
Add the class <b>colored-ol</b> to the ol element
<ol class="colored-ol">
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
<li>List Item</li>
</ol>
</div>
<div class="col-12 col-lg-4">
Add the class <b>bolded-ol</b> to the ol element
<ol class="bolded-ol">
<li>List Item, try to add more text to see it better and see how the text is wrapped</li>
<li>List Item, try to add more text to see it better</li>
<li>List Item</li>