Mobile-first lightweight CSS Framework that has reduced styling coding costs to a minimum with non-BEM and simpler naming conventions than OOCSS.
The Sloth is lightweight as it saves the effort to rely on the legacy browser. Also, the Sloth can use advanced styling technology that utilizes flexbox, grid, CSS variables, and limited vendor prefixes.
18.8kB gzipped at this time.
Also since version 1.0.3, it has been added the sloth extensions script that enhances your mark-up the components on the HTML. By using this extension, you get usable the advanced validation form or the popping dialog window, etc.
You can install via bower:
bower install --save sloth-css
Or, you can install via npm:
npm install --save sloth-css
Or, you can clone the source:
git clone https://github.com/ka215/sloth.git
Or, you can load via CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ka215/sloth@master/dist/sloth.min.css"> <script async src="https://cdn.jsdelivr.net/gh/ka215/sloth@master/dist/sloth.extension.min.js"></script>
The Sloth provides one CSS file
sloth.min.css that minified. In order to use one, you can add a
<link> in your
<!doctype html> <html> <head> ︙ <link rel="stylesheet" href="/path/to/sloth/dist/sloth.min.css"> ︙ </head> <body> ︙ </body> </html>
Marking up in the Sloth style is very easy. Basically, you can complete most of your work simply by declaring the
.sloth class to the parent element you want to apply style to.
You can apply the Sloth style on the entire page by assigning the
.sloth class to the
<body class="sloth"> ︙ </body>
Alternatively, it is possible to apply the Sloth style only within a specific element as shown below.
<div class="sloth"> ︙ </div>
Also, by using the
.nons class in the element to which the Sloth style is applied, it is possible to exclude only a specific element from the Sloth style application.
<body class="sloth"> ︙ <h1 class="nons">Not Sloth Styled headline</h1> ︙ </body>
Documentation & Demo
You would prefer to see the following URL for a list of all elements and components expressed in the Sloth style.
- Fork it
- Welcome new pull request
ka2 (Katsuhiko Maeno)
Your donations for supporting the Sloth style will help me.
Donate URL: https://ka215.github.io/sloth/donation.html
Thanks to Our Contributors and Sponsors.
- "Normalize.css" and "Bootstrap-reboot.css" for the foundation.
- Inspired by the "Furtive".
- Inspired by the "@mallendeo".