Skip to content
Mobile-first CSS Lightweight Framework. It has reduced styling coding costs to a minimum with non-BEM and simpler naming conventions than OOCSS.
CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
docs
src
.eslintrc
.gitattributes
.gitignore
.stylelintrc
LICENSE
README.md
babel.config.js
gulpfile.babel.js
package.json
postcss.config.js
webpack.config.js

README.md

Sloth

Mobile-first lightweight CSS Framework that has reduced styling coding costs to a minimum with non-BEM and simpler naming conventions than OOCSS.

Sloth Pickup Styles: Forms Sloth Pickup Styles: Toggle Buttons Sloth Pickup Styles: Buttons Sloth Pickup Styles: CSS Grids Sloth Pickup Extensions: Dialog

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.

The Sloth supports SCSS and postCSS, and you can customize your build with the included gulp file. Then the Sloth is providing at only distributed css file without dependenting JavaScript.

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.

GitHub release GitHub All Releases Packagist


Installation

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>

Usage

The Sloth provides one CSS file sloth.min.css that minified. In order to use one, you can add a <link> in your <head>.

<!doctype html>
<html>
<head>
  ︙
  <link rel="stylesheet" href="/path/to/sloth/dist/sloth.min.css">
  ︙
</head>
<body>
  ︙
</body>
</html>

Markup

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> element.

<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.

https://ka2.org/sloth/

Contributions

  1. Fork it
  2. Welcome new pull request

Creators

ka2 (Katsuhiko Maeno)

Your donations for supporting the Sloth style will help me.

Donate URL: https://ka215.github.io/sloth/donation.html

Special Thanks

Thanks to Our Contributors and Sponsors.

Copyright and license

Code and documentation copyright 2019 the ka2. Code released under the MIT License.

You can’t perform that action at this time.