Coder Social home page Coder Social logo

sane-tachyons's Introduction

Sane Tachyons

npm version

This is a fork of Tachyons. It is sane.

Therefore, it is called sane-tachyons.

It is small and mighty. The minified CSS file is just 9,267 bytes when gzipped. For comparisons sake, the latest Bootstrap is 22,990 bytes, and does much less.

Getting started

yarn add sane-tachyons # or `npm install sane-tachyons`
/* (optional) define project specific variables (see src/__variables.scss) */
$grid-columns: 12;

/* import sane-tachyons */
@import "~sane-tachyons/reset";
@import "~sane-tachyons/sane-tachyons";

Motivation

Tachyons gives us:

  • Abbreviated, composable, simple, predictable class names
  • Massively reduced duplicate CSS
  • Mobile first approach
  • Reduced specificity issues
  • A sensible power of 2 spacing scale (..., 1rem, 2rem, 4rem, ...)
  • Everything in rem

Key changes are:

  • written in SCSS, with plenty of variables
    • including maps and lists ๐ŸŒˆ
  • uses a custom reset rather than normalize
    • to encourage use of semantic (crawler/browser/human friendly) html elements
    • for example, <h1>Text</h1> looks the same as <p>Text</p> until classes such as .h1 or .normal are added, but search engine can tell the first is a title, potentially improving SEO
  • Just one breakpoint, l_ for large (large is a variable and so can be changed, and by default is >480px to target non-phones)
  • Adds a few utility classes that aren't included in tachyons
  • Fixes some god-awful parts of tachyons, like its approach to flexbox
  • Removes some strangely specific tachyons things, like colors and type scale, and replaces it with a more real-world setup
  • Assumes only supporting sane browsers (with exception of IE11)

Future stuff

Future probable changes are:

  • Fonts as scss variables
  • Toggle-able variable font support


(MIT Licence)

sane-tachyons's People

Contributors

hatched-tom avatar tbjgolden avatar hatched-priyanka avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.