All Projects → colepeters → Gemma

colepeters / Gemma

A lightweight CSS library.

Projects that are alternatives of or similar to Gemma

ekzo
💫 Functional Sass framework for rapid and painless development
Stars: ✭ 32 (-65.96%)
Mutual labels:  functional, atomic
Quark
Quark.js is a microscopic atomic CSS polyfill in JS just 140 bytes
Stars: ✭ 97 (+3.19%)
Mutual labels:  atomic, styling
Lambda
Fun with λ calculus!
Stars: ✭ 65 (-30.85%)
Mutual labels:  functional
Alfa
Effortless React State Management.
Stars: ✭ 86 (-8.51%)
Mutual labels:  functional
Fantas Eel And Specification
Examples and exercises from the blog series
Stars: ✭ 77 (-18.09%)
Mutual labels:  functional
Axis3d
Functional 3d graphics library
Stars: ✭ 67 (-28.72%)
Mutual labels:  functional
Fantasy Land
Specification for interoperability of common algebraic structures in JavaScript
Stars: ✭ 9,209 (+9696.81%)
Mutual labels:  functional
Elementx
⚡️ Functionally create DOM elements and compose them to a tree quickly
Stars: ✭ 62 (-34.04%)
Mutual labels:  functional
Dush
👏 Microscopic & functional event emitter in ~350 bytes, extensible through plugins.
Stars: ✭ 87 (-7.45%)
Mutual labels:  functional
Oh
A new Unix shell.
Stars: ✭ 1,206 (+1182.98%)
Mutual labels:  functional
Html
A Virtual DOM based templating-engine for PHP
Stars: ✭ 86 (-8.51%)
Mutual labels:  functional
Suave
Suave is a simple web development F# library providing a lightweight web server and a set of combinators to manipulate route flow and task composition.
Stars: ✭ 1,196 (+1172.34%)
Mutual labels:  functional
Pipe
[READONLY] Library for implementing function call chains
Stars: ✭ 70 (-25.53%)
Mutual labels:  functional
Bulb
A reactive programming library for JavaScript.
Stars: ✭ 84 (-10.64%)
Mutual labels:  functional
Openapi Spring Webflux Validator
🌱 A friendly kotlin library to validate API endpoints using an OpenApi 3.0 and Swagger 2.0 specification
Stars: ✭ 67 (-28.72%)
Mutual labels:  functional
Funcy.js
funcy.js - a functional web components wrapper
Stars: ✭ 87 (-7.45%)
Mutual labels:  functional
Pypika
PyPika is a python SQL query builder that exposes the full richness of the SQL language using a syntax that reflects the resulting query. PyPika excels at all sorts of SQL queries but is especially useful for data analysis.
Stars: ✭ 1,111 (+1081.91%)
Mutual labels:  functional
Request via
RequestVia: A Functional HTTP Client That Wraps Net::HTTP
Stars: ✭ 74 (-21.28%)
Mutual labels:  functional
Ring Buffer
simple C++11 ring buffer implementation, allocated and evaluated at compile time
Stars: ✭ 80 (-14.89%)
Mutual labels:  atomic
Interfacss
The CSS-inspired styling and layout framework for iOS
Stars: ✭ 92 (-2.13%)
Mutual labels:  styling

Gemma

npm-version js-standard-style CDNJS

Functional/atomic/whatever-we’re-calling-it CSS for fun and (complete lack of) profit

Built for performance and (re)usability, Gemma is a collection of foundational styles and classes for creating beautifully simple, highly effective CSS.

Philosophy

Gemma’s philosophical approach to CSS is nothing new, but tried and true. It favours:

  • mobile-first, lightweight styles
  • responsive design as a default
  • forming both basic and more nuanced components from independent, highly recombinable pieces (think Lego!)
  • designing systems that are easy for developers and designers to learn and use
  • keeping CSS bundles compact and quick to deliver to users

Usage

The easiest way to use Gemma is to source it from Unpkg:

<link rel='stylesheet' href='https://unpkg.com/[email protected]/public/gemma.min.css'>

Or you can include it as a project dependency via NPM:

npm i --save gemma

…in which case, you’ll need to import the compiled, minified code:

@import '../path-to-your-copy-of/gemma/public/gemma.min.css';

Class naming

Class names in Gemma follow these naming conventions:

  • For classes which deal with properties that take named attributes, e.g. text-align, the class name will begin with that property’s name as an acronym, e.g. ta, followed by a dash, and an acronym for the attribute name, e.g. c for center. Full example: ta-c = text-align: center
  • For classes which deal with properties that take numerical attributes, e.g. padding-right, the class name will begin with that property’s name as an acronym, followed by the number (without units, and not preceded by a dash). Full example: pr1 = padding-right: 1<unit/increment>

(Note: where several property names are part of a larger CSS module, e.g. flexbox, classes are preceded with a letter to indicate this module. Therefore the flexbox-related property align-content can be set with classes beginning with fac for (flex) align-content.)

This system may seem overly concise at first, but after using the system for awhile, it should start to feel natural. The brevity of this naming system saves you from typing more characters than necessary, and saves space in your markup. (On a personal note, previous CSS libraries that I’ve worked on have erred more on the side of verbosity, where the class for text-align: left would be align-left. While this felt fool-proof at first, after several months of usage, typing such a comparatively long class name became annoying, especially once the library classes had become memorised.)

Development

Full disclosure: I built Gemma primarily as a personal exercise. If you’re looking for something that will be regularly updated, you might consider something more active and full-featured, like Tachyons.

With that said, if you want to work on Gemma as a fork or to submit a contribution:

  1. Clone the latest master branch of the repository (git clone https://github.com/colepeters/gemma.git)
  2. cd to the repository and install dependencies via npm (cd gemma && npm i)

Development tasks are currently managed with npm scripts:

npm run lint

Gemma ships with a linting configuration which is passed to Stylelint. The lint task will examine all CSS files in the source directory, and output any linting errors to the command line via postcss-reporter.

npm run compile

Passes all source CSS files to postcss-cssnext, via postcss-cli. This transforms source CSS custom properties to their computed values and minifies the output, resulting in a gemma.min.css file.


Additional useful information can be found in the source files readme.

Inspiration

Gemma’s philosophical and stylistic leanings have been heavily influenced by the following projects:

and the following people:

(and likely more whom I’ve forgotten to mention).


A gemma (/ˈdʒɛmə/ with a soft "g", as in "general") is a single cell, or a mass of cells, that detaches from the parent and develops into a new individual.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].