项目作者: yegor256

项目描述 :
Primitive CSS classes to replace most commonly used CSS styles
高级语言: CSS
项目地址: git://github.com/yegor256/drops.git
创建时间: 2019-09-23T13:23:48Z
项目社区:https://github.com/yegor256/drops

开源协议:MIT License

下载


Simple but Useful CSS Classes

DevOps By Rultor.com

grunt
PDD status
License
NPM version
Hits-of-Code

First, you add it to your HTML:

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/drops@0.2.0/dist/drops-0.2.0.min.css"/>
  5. </head>
  6. </html>

And then, instead of this:

  1. <p style="color: tomato; font-weight: bold; text-align: right;">Hello</p>

You do this:

  1. <p class="tomato bold right">Hello</p>

Here is a full list of “drops” (excluding the colors):

CSS class Style
bold font-weight: bold;
italic font-style: italic;
underline text-decoration: underline;
monospace font-family: monospace;
serif font-family: serif;
sans-serif font-family: sans-serif;
right text-align: right;
left text-align: left;
center text-align: center;
smaller font-size: .8em;
larger font-size: 1.2em;
invisible display: none;
block display: block;
inline display: inline;
inline-block display: inline-block;
position-static position: static;
position-relative position: relative;
position-absolute position: absolute;
position-fixed position: fixed;
position-sticky position: sticky;

There is also a set of drops for responsive design, like desktop-only and
no-printer for desktop, printer, mobile, and tablet.

Also, all 140 web colors
are supported, like tomato or blueviolet.

How to contribute

Fork repository, make changes, send us a pull request. We will review
your changes and apply them to the master branch shortly, provided
they don’t violate our quality standards. To avoid frustration, before
sending us your pull request please run full Grunt build:

  1. npm install
  2. npm test