nickyeoman/sasslibrary

sass library

2.0.8 2023-01-26 00:36 UTC

This package is auto-updated.

Last update: 2024-11-03 00:32:13 UTC


README

Links

Philosophy

I like to keep my code clean, so the main goal of this project is the following:

  • Keep a library of useful styles that can easily be called
  • Don't load anything you don't use
  • Don't load more than one style sheet
  • Try not to minimize the number of classes per element.

Usage

The intended use is as follows:

# create directory schema
mkdir -p PROJECTNAME/sass PROJECTNAME/public/css
cd PROJECTNAME

# Get the library
composer require nickyeoman/sassLibrary

# Create an index page or include the css file in your template
cp vendor/nickyeoman/sasslibrary/html/sample.layout.html public/index.html

# Create a master sass file in the sass directory of your project.
mkdir sass; touch sass/project.sass

# import the libraries
echo '@import ../vendor/nickyeoman/sasslibrary/master.sass' > sass/PROJECTNAME.sass

# compile sass
sass sass/project.sass public/css/main.css

Nothing should happen as you have to explicitly call on the library for it to render. For example, in sass/project.sass you will want to do:

html
  +htmldefaults
  +library
  +print

Install SASS on Ubuntu

First you need npm:

sudo apt install npm

Then you need sass:

sudo npm install -g sass

See SASS' website for more