obsidian.scss

0.0.1 • Public • Published

Obsidian.scss

A port of Obsidian.css for Sass

Obsidian.css is a modular CSS library that focuses on code common to most projects.

This project works under the belief that when abstracted most CSS is shockingly similar across projects. More than likely you'll need a type scale, a grid system, spacing utilities, media blocks, sensible default styling for elements (forms, tables, buttons). This project is a collection of the CSS patterns that have stuck with me over the last two years and grown with me.

Styles are written in an adapted BEM naming convention and organized in an ITCSS-like methodology. It uses cssnext to compile variables, custom selectors and custom media queries.

Installation

npm i obsidian.scss

Compiling

Importing Sass files from npm can be a tricky business...

@import "obsidian";
 
$headlines: 'Proxima Nova Condensed'Lucida Grande, sans-serif;
$body-text: 'Meta Serif Pro', Charter, serif;

Gulp

import gulp from 'gulp'
import sass from 'gulp-sass'
import obsidian from 'obsidian.scss'
 
gulp.task('sass', () => {
  gulp.src('path/to/input.scss')
    .pipe(sass({
      includePaths: obsidian.includePaths
    }))
    .pipe(gulp.dest('path/to/output.css'))
})

Grunt Usage

Using grunt-sass

Example config:

grunt.initConfig({
  sass: {
    dist: {
      options: {
        includePaths: require('obsidian.scss').includePaths
      },
      files: {
        'path/to/output.css': 'path/to/input.scss'
      }
    }
  }
})

Node Sass CLI

node-sass ./lib/index.scss ./dist/bundle.css -o dist --output-style compressed --includePath ./node_modules/obsidian.scss/lib/*.scss

Development

  1. Clone the repository
  2. Run npm install; npm run bundle

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.

Package Sidebar

Install

npm i obsidian.scss

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • charlespeters