Installation
Installing with a package manager
npm
npm install tidgridyarn
yarn add tidgridImport Tidgrid in a JavaScript file:
// CommonJS
require("tidgrid");
// ES6
import "tidgrid";Or in a Sass file:
@import "tidgrid";Using CDN
Access Tidgrid directly and fetch the latest build from jsDelivr. The hosted file contains the compiled CSS. Attach it to your project with zero dependencies to package managers and build tools.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sneikki/tidgrid@0.1.0-alpha.2/build/tidgrid.css" integrity="sha384-QB3RSUytwAFXoMg/cxubzIPCegtfmMedCoMd6mS3GlMco/vDi75t379PxstKly8F" crossorigin="anonymous">Keep in mind that the hosted version loads all of the compiled CSS. You almost always use just a tiny subset of all the styles provided, and the rest are useless for your project. This may or may not be a problem, based on the circumstances. The minimized build takes up 66 KB space. If your target audience has poor bandwidth, consider installing Tidgrid with a package manager and use tree-shaking to remove all unused styles.
Compiling yourself (using npm)
Download the latest release or clone the repository to get the source code.
Install dependencies
npm installBuild
Compile Tidgrid and output the unminimized CSS in the build directory.
npm run buildMinimized build
Compile Tidgrid, minimize the CSS and output it in the build directory.
npm run compile:minimized