Usage
Installation
npm install obsidian.css --save
or link to the CDN
<link rel="stylesheet" href="https://unpkg.com/obsidian.css" media="screen" title="Obsidian.css" charset="utf-8">
Using in Build
Recommended you use PostCSS and postcss-import.
Example using Gulp.js:
const gulp = require('gulp');
const postcss = require('gulp-postcss');
const atImport = require('postcss-import');
const env = require('postcss-preset-env');
const processors = [
atImport,
env
];
gulp.task('styles', ()=> {
return gulp.src('path/to/stylesheet')
.pipe(postcss(processors))
// Probably other tasks
.pipe(gulp.dest('path/to/destination'));
})
then import into your CSS and modify some variables:
@import 'obsidian.css/lib/settings';
@import 'obsidian.css/lib/generic';
@import 'obsidian.css/lib/elements';
@import 'obsidian.css/lib/objects/obsidian.grid';
@import 'obsidian.css';
:root {
--headlines: 'Proxima Nova Condensed', Lucida Grande, sans-serif;
--body-text: 'Meta Serif Pro', Charter, serif;
}
And things should compile the way you'd expect.