This repository has been archived by the owner on Apr 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Sass and replace with Pleeease
This commit removes Sass support from the project and adds Pleeease as a CSS post-processor. Preprocessors do have a couple of problems: * CSS is meant to be declarative. Preprocessors add a lot of functions to it that are not easy to understand and require higher level thinking. Logicless-ness makes CSS simple. * Specificity is often problematic (e.g. with deep nesting). * People that are not used to one or the other preprocessor are left behind. Everyone knows CSS. Reference: #123.
- Loading branch information
Showing
31 changed files
with
295 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
*.sass-cache | ||
*.sublime-* | ||
|
||
src/css | ||
dist | ||
bower_components | ||
node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[« back to Table of Contents](TOC.md) | ||
|
||
|
||
# CSS | ||
|
||
INIT uses [Pleeease](http://pleeease.io/) as a CSS post processor which enables | ||
you to write straightforward CSS. | ||
|
||
Here are the major selling points: | ||
|
||
* Pleeease adds prefixes, based on Autoprefixer | ||
* It provides fallbacks for rem unit, CSS3 pseudo-elements notation | ||
* It adds opacity filter for IE8 | ||
* It converts CSS shorthand filters to SVG equivalent | ||
* It packs same media-query in one @media rule | ||
* It inlines @import styles | ||
* It minifies the result | ||
* It enables you to use custom properties (variables) | ||
* It has some color functions for you | ||
|
||
In INIT we modularize our styles in several components. | ||
Most of the files contain some raw styles or example code so you can just view | ||
the files to understand what they are thought for. Surely you can adapt the | ||
files and contents of the files to your own project-style. | ||
|
||
## Concatenation | ||
|
||
As we use several single CSS-files they need to be concatenated for usage in | ||
your project. This is done by the CSS `@import` rule within the | ||
[`src/css/main.css`](../src/css/main.css) file. As you can see you just type the | ||
folder and name of the file to import it. Please be aware that you must use the | ||
path from the root directory. | ||
|
||
Notice: Don't forget to import a file in `main.css` if you created a new one in | ||
the CSS structure so it will be added to the output file you use in your | ||
project. | ||
|
||
## CSS Output | ||
|
||
You kick-off the post processor with grunt. To continuously generating the CSS | ||
file on every change you do, run: | ||
|
||
grunt watch | ||
|
||
This runs the `watch` task with grunt which compiles your CSS. The watch task | ||
outputs a non-minified annotated CSS file which is great for development. | ||
|
||
To get a compressed, production ready CSS file simply run the following command: | ||
|
||
grunt build | ||
|
||
See the [documentation about grunt](grunt.md) for more information about this | ||
task. | ||
|
||
## Preprocessors | ||
|
||
We believe the CSS platform offers you everything that is needed to craft great | ||
on-line experiences. CSS preprocessors such as LESS or Sass add a lot of value | ||
for programmers. But there are some pain points which we think make it hard to | ||
use these preprocessors. | ||
|
||
* CSS is meant to be declarative. Preprocessors add a lot of functions to it | ||
that are not easy to understand and require higher level thinking. Logicless- | ||
ness makes CSS simple. | ||
* Specificity is often problematic (e.g. with deep nesting). | ||
* People that are not used to one or the other preprocessor are left behind. | ||
Everyone knows CSS. | ||
|
||
Our post-processor enables you to use variables (known as custom properties), | ||
color functions and takes care of vendor prefixing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,30 +2,28 @@ | |
|
||
# General Purpose | ||
|
||
Init is a project based upon HTML5 Boilerplate. It adds more structure to your SCSS and JavaScript files and helps you start your project faster by reducing boilerplate code and tasks. | ||
Init includes build tasks for your projects, proivdes a test infrastructure and implements tools to help you creating web pages and apps fast. | ||
Init is a project based upon HTML5 Boilerplate. It adds more structure to your | ||
CSS and JavaScript files and helps you start your project faster by reducing | ||
boilerplate code and tasks. | ||
|
||
Init includes build tasks for your projects, proivdes a test infrastructure and | ||
implements tools to help you creating web pages and apps fast. | ||
|
||
# Starting Point | ||
|
||
When starting a new project with init you will need to make sure to install some dependencies if you haven't already. | ||
When starting a new project with init you will need to make sure to install some | ||
dependencies if you haven't already. | ||
|
||
## Clone the project | ||
|
||
$ git clone [email protected]:use-init/init.git | ||
|
||
This will create a local clone of init in a subfolder called 'init' in the directory you choose before in the command line. You can rename the folder name. | ||
This will create a local clone of INIT in a subfolder called 'init' in the | ||
directory you choose before in the command line. You can rename the folder name. | ||
|
||
## Dependencies | ||
|
||
### Majors: | ||
|
||
* Node.js | ||
* Ruby | ||
|
||
#### Secondaries: | ||
|
||
* npm (comes with node) | ||
* Sass (Ruby gem: `$ gem install sass`) | ||
|
||
Apart from that we make use of GruntJS and you might want to install it globally via: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* CSS | ||
*/ | ||
'use strict'; | ||
|
||
var config = require('../config'); | ||
|
||
/* | ||
* Helper | ||
*/ | ||
var helper = {}; | ||
|
||
helper.cssDev = {}; | ||
helper.cssDev[config.css.devDest] = config.css.src; | ||
|
||
helper.cssProd = {}; | ||
helper.cssProd[config.css.dest] = config.css.src; | ||
|
||
module.exports = { | ||
|
||
// For development | ||
dev: { | ||
options: { | ||
minifier: false, | ||
next: { | ||
customProperties: true, | ||
colors: true | ||
}, | ||
sourcemaps: true | ||
}, | ||
|
||
files: helper.cssDev | ||
}, | ||
|
||
// For production | ||
build: { | ||
options: { | ||
next: { | ||
customProperties: true, | ||
colors: true | ||
}, | ||
sourcemaps: true | ||
}, | ||
|
||
files: helper.cssProd | ||
} | ||
}; |
Oops, something went wrong.