Skip to content

Instantly share code, notes, and snippets.

View KasperAndersson's full-sized avatar
🔵
Vertified

Kasper Andersson KasperAndersson

🔵
Vertified
View GitHub Profile

How to couple Sass and CSS Var

If you use Sass extension, you can work with CSS variables.

First, let's create our css variable.

html, :root
  --MyColor: #5966D2

// :root is not an element for Sass. But you can use html before.
@KasperAndersson
KasperAndersson / gulp-modernizr.js
Last active March 8, 2017 22:46
gulp modernizr
var gulp = require('gulp');
var modernizr = require('gulp-modernizr');
gulp.task('modernizr', function() {
return gulp.src(['js/**/*.js', 'scss/**/*.scss'])
.pipe(modernizr({
'cache': true,
'options': [
'setClasses'
]
// Put this into functions.php
// Learn more : http://codex.wordpress.org/Post_Types
function custom_post_type() {
$labels = array(
'name' => 'Books',
'singular_name' => 'Book',
'add_new' => 'Add New',
'add_new_item' => 'Add New Book',
'edit_item' => 'Edit Book',