Functional css for humans
Find a file
2015-10-23 15:53:21 -06:00
css Add compiled css with gradient. 2015-10-23 15:53:17 -06:00
docs Update module docs after updating npm modules. 2015-10-23 15:53:20 -06:00
examples Add example for header component. 2015-10-23 15:53:17 -06:00
img Update the image to be much smaller. 2015-10-23 15:53:21 -06:00
js Update docs. Move home.js back to root as a quick fix to paths not working 2015-07-16 10:35:53 +08:00
lib Add functions for parsing colors. 2015-07-12 19:10:17 +08:00
src Adding some gradients. Add 6th height step. 2015-10-23 15:53:17 -06:00
templates Update to latest versions of modules after bug fixes. 2015-10-23 15:53:20 -06:00
.gitignore Change syntax for the npm-debug.log 2015-07-12 19:26:53 +08:00
CNAME Update CNAME. 2015-06-26 22:02:19 -07:00
gulpfile.js Add s3 module for uploading to cdn. 2015-10-23 15:21:18 -06:00
home.js Update script. 2015-10-23 15:53:17 -06:00
index.html Update to latest versions of modules after bug fixes. 2015-10-23 15:53:20 -06:00
package.json Update to latest versions of modules after bug fixes. 2015-10-23 15:53:20 -06:00
README.md Added link to Tachyons slack channel. 2015-10-06 13:04:23 -07:00
widths.js Automate widths.js documentation with some js 2015-10-23 15:53:18 -06:00

TACHYONS

About

Tachyons is a work in progress and still heavily in flux. The important parts of tachyons are the separation of concerns and the mobile-first and modular architecture.

More documentation and examples will be coming. For now - reading the source files in the src directory are a great way to get up to speed. I promise they are not complicated.

There is now a Tachyons slack channel. Submit your email to be automatically invited.

TLDR;

Build responsive, performant, and easy to maintain interfaces faster than the speed of light.

Principles

  • Everything should be 100% responsive
  • Everything should be readable on any device
  • Everything should be as performant as possible
  • Designing in the browser should be easy
  • It should be easy to change any interface or part of an interface without breaking any existing interfaces
  • Doing one thing extremely well promotes reusability and reduces repetition
  • CSS is global. HTML is not. Send the smallest amount of code to the user as possible.

Features

  • Mobile-first css
  • Single-purpose class architecture
  • Optimized for maximum gzip compression
  • Less than 20kB when minified and gzipped
  • Usable across projects
  • Infinitely nestable responsive grid system
  • Several color palettes
  • Currently built on rework

Getting started

The easiest way to use tachyons is to include the minified file in the head. If you want to reduce the size of the library greatly on production I suggest using uncss to remove styles you aren't referencing.

Modify the source

Set up the project by cloning the repo, navigating into it, and installing the necessary dependencies by running the following commands:

 git clone git@github.com:mrmrs/tachyons.git yourProject
 cd yourProject
 rm -rf .git
 git init
 git add remote git@github.com/yourUserName/yourProject.git
 npm install . && npm start

You can alternatively fork the repo and clone your own version of it.

To run the development environment

npm start

This will watch the src directory and do the following on file change:

  • Compile rework css files
  • Run autoprefixer (this allows you to keep vendor prefixes out of your source files)
  • Run an instance of browser-sync - this causes any browsers or devices pointing to your local server to reload on file change. It will also keep all browsers in sync with eachother i.e. they will all scroll simultaneously. If you fill out a form on one device all devices will be updated with that content. It can be a huge help if you are testing multiple browsers or devices.

Some things I've built with Tachyons

A Note on Class Names

As tachyons started out as an experiment in css performance - many of the names were programmatically generated using vim macros based on the content of the properties and values they represent. As I have begun to work on tachyons more and use it in the wild, I've begun to codify common classes to things that my brain naturally leans towards remembering. I like unix a lot and subscribe to naming conventions like cp over copy for common classes that I use frequently.

That being said I think the naming in Tachyons needs work and I am open to hearing peoples feedback on things they like and also the things they don't like. Once Tachyons is a little more finished I will be generating different 'flavors' of the framework that use different naming patterns. One version being a more verbose class naming system that seems to be aligned with what many people prefer.

License

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.