Back to directory
ruedap avatar

emma.css

๐Ÿด Emma.css { utility-classes: emmet-like; }. Read more below about its uses, features, and usage.

Clone repository

git clone https://github.com/ruedap/emma.css.git

56

Stars

12

Forks

1

Watchers

MIT

License

logo box

Emmet-like utility classes for rapid and easy front-end development.

Circle CI NPM Version License

Example

Emma.css class Emmet abbreviation Declaration (Expanded abbreviation)
.d-b d-b display: block;
.d-fx d-fx display: flex;
.m-a m-a marign: auto;
.m0 m0 margin: 0;
โ€• m-5 margin: -5px;
.w1 w1 width: 1px;
.h100p h100p height: 100%;
.mah50vh mah50vh max-height: 50vh;
.ff-t ff-t font-family: "Times New Roman", Times, Baskerville, Georgia, serif;
.fz16 fz16 font-size: 16px;
.fz-sm โ€• font-size: small;
.pb-md โ€• padding-bottom: 1.0rem; (default value)
.ml-lg โ€• margin-left: 2.0rem; (default value)

See emma.css (all classes)

Emma.css only:

<article class="cf">
  <img class="d-b fl-l w-a mr-xl bdrs3" src="foo.png">
  <div class="fl-l ml-lg p-md">
    <h1 class="m0 ff-t">Title</h1>
    <p class="wow-bw wfsm-a">Description</p>
    <a class="d-ib fz-sm lh2" href="#">Read more</a>
  </div>
</article>

SUIT CSS naming convention + Emma.css (set prefix u-):

<article class="Excerpt u-cf">
  <img class="Excerpt-thumbnail u-d-b u-fl-l u-w-a" src="foo.png">
  <div class="u-fl-l u-ml-lg u-p-md">
    <h1 class="Excerpt-title">Title</h1>
    <p class="u-wow-bw u-wfsm-a">Description</p>
    <a class="Excerpt-readMore" href="#">Read more</a>
  </div>
</article>

Installation

Install or download Emma.css from one of these sources.

npm install --ignore-scripts emma.css

Download

https://github.com/ruedap/emma.css/releases

Getting Started

Basic usage

SCSS:

@import "emma.css/scss/all";

CSS output:

.pos-s { position: static !important; }
.pos-a { position: absolute !important; }
.pos-r { position: relative !important; }
(snip)

Add prefix to utility classes

You can add prefix to utility classes by $emma-prefix variable:

$emma-prefix: "u-"; // Set prefix
@import "emma.css/scss/all";

CSS output:

.u-pos-s { position: static !important; }
.u-pos-a { position: absolute !important; }
.u-pos-r { position: relative !important; }
(snip)

Remove !important annotations

You can remove !important annotations by $emma-important variable:

$emma-important: false; // Remove !important annotations
@import "emma.css/scss/all";

CSS output:

.pos-s { position: static; }
.pos-a { position: absolute; }
.pos-r { position: relative; }
(snip)

Change default sizes or colors

You can change default sizes or colors by variables:

$emma-padding-md: 20px;  // default: `1.0rem`
$emma-color-black: #000; // default: `#111111`
@import "emma.css/scss/all";

License

Released under the MIT license.

Author

ruedap

Releases

Release Notes ๐Ÿงฐ Maintenance

ci: add npm publish workflow with OIDC Trusted Publishing @ruedap chore: pin tsx version to exact 4.21.0 @ruedap

๐Ÿ“ฆ Dependencies

chore(deps): update dependency sass to...

Release Notes ๐Ÿš€ Features

Migrate Sass @import to @use/@forward syntax for Dart Sass 3.0 compatibility (#332) @ruedap

๐Ÿ› Bug fixes

Correct bugs URL in package.json from emma.scss to emma.css @rueda...

Oct 8, 2022

0.15.0 (2018-05-28)

Download .zip

Features

Add snippets fx0, fx1, fx2, fx3 (2c7c200) Declare variables of font-family (6e97b9f) Declare variables of font-weight (370db6e) Remove snippets ff-a, ff-t, ff-v, ff-l, ff-ja (f3a0cdc)

BREAK...

Oct 8, 2022

0.14.0 (2018-04-19)

Download .zip

Bug Fixes

Remove snippet abce (c98c7c0)

Features

Add snippet cxcy (02f3b89) Add snippet fw-l (font-weight: 300) (f58fb4c) Add snippet fx-a (9b5e1f0) Add snippets deol, deul (dedc8e3) Add snippets t...

Release Notes

v0.15.1 (#286) @ruedap

๐Ÿงฐ Maintenance

Upgrade node to v18 (#285) @ruedap Remove gulp (#284) @ruedap Update node to v16 (#276) @ruedap Add workflow files for GitHub Actions (#33) @rued...