@sharegate/tachyons-sg v3.1.0
Tachyons for Sharegate
Sharegate's take on Tachyons CSS - the main differentiators being that you can easily override the default values of Tachyons by importing Css "config" files and a spacing scale based on 10. CSS Variables are not compiled by default, in order to do so please check the package.json file.
Getting started
Docs can be found at Tachyons The modules are generally pretty small and thus quick and easy to read. Since this is a fork of Tachyons in some instances the official doc is not exactly the truth, please for the time being open the src css files when in doubt.
Local Setup
Clone the repo from github and install dependencies through npm.
git clone https://github.com/sharegate/tachyons-sg.git
cd tachyons-sg
npm install
Dev
If you want to just use everything in tachyons/src as a jumping off point and edit all the code yourself, you can compile all of your wonderful changes by running
npm start
This will output both minified and unminified versions of the css to the css directory and watch the src directory for changes. It's aliased to the command:
npm run build:watch
If you'd like to just build the css once without watching the src directory run
npm run build
If you want to check that a class hasn't been redefined or 'mutated' there is a linter to check that all of the classes have only been defined once. This can be useful if you are using another library or have written some of your own css and want to make sure there are no naming collisions. To do this run the command
npm run mutations
Configuration
If you want to override the default variables specified in tachyons-sg
(for instance, changing the color of the --primary
variable), simply redeclare the variables in a :root
css class.
:root {
--primary: #c63a0c;
}
Hot reload (Doc)
In a separate terminal run
npm run serve
This will open an url that will reload everytime you change the doc index.html or change any CSS
Publish
Semantic Versioning
Before you publish, make sure you understand semantic versioning.
Go
First thing first... make sure you're logged in to NPM.
If you're not, run the following command
npm login
and follow the instructions.
Run the following command and let the magic happen
npm version major | minor | patch --otp=[YOU_AUTHENTICATOR_CODE]
If you have the following error
npm ERR! Git working directory not clean.
Make sure you've push your changes to Git prior to running the command.
What the magic does
The version script is based on the recipe described in the npm-version documentation.
The following steps will be executed in order
- Bump the version of the package
- Build Tachyons
- Delete the
publish
folder - Copy Tachyons SG distribution files to the
publish
folder - Copy
package.json
,LICENCE
andREADME.md
files from the root to thepublish
folder - Commit + push the package changes
- Publish the package to
NPM
Docs
The tachyons docs located at Tachyons are all open source and located here.
Acknowledgements
@mrmrs for having created tachyons and introducing me to the wonderful world of Atomic CSS.
License
Copyright © 2018, Groupe Sharegate inc. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license here.
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago