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
/// Map Search | |
/// Get the first occurance of a key from a nested map | |
/// | |
/// @author [@esr360](http://twitter.com/esr360) | |
/// | |
/// @access public | |
/// @group Tools | |
/// | |
/// @param {map} $map - the map you would like to search | |
/// @param {string} $target-key - the key you are searching for |
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
// Requirements | |
var sass = require('node-sass'); | |
var fs = require('fs'); | |
var mkdirp = require('mkdirp'); | |
var getDirName = require('path').dirname; | |
function compileSass(options = {}) { | |
// set default options | |
options = Object.assign({ | |
style: 'expanded' |
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
var sass = require('node-sass'); | |
sass.render({ | |
file: scss_filename, | |
[, options..] | |
}, function(err, result) { /*...*/ }); | |
// OR | |
var result = sass.renderSync({ | |
data: scss_content | |
[, options..] | |
}); |
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
import * as app from '../../app'; | |
/** | |
* Determine if an element is in the viewport | |
* | |
* @access public | |
* | |
* @param {Object} custom - where custom options are passed | |
*/ | |
export function inViewport(custom) { |
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
@include module('header') { | |
@include component('social-links') { | |
@include _module('list', ('reset', 'inline'), false); | |
@include component('item') { | |
@include _module('button', ( | |
'brand-1-light', 'circle', 'icon', 'border', 'size-3' | |
)); | |
} | |
} |
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
const MODULE = 'accordion'; | |
document.querySelectorAll(`.${MODULE}`).forEach(accordion => { | |
const panels = accordion.querySelectorAll(`.${MODULE}__panel`); | |
panels.forEach(panel => { | |
const TITLE = panel.querySelector(`.${MODULE}__title`); | |
const CONTENT = panel.querySelector(`.${MODULE}__content`); | |
... | |
}); |
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
.accordion { | |
color: map-get($colors, brand-2); | |
... | |
} |
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
@import 'modules/utilities/colors/colors'; | |
@import 'modules/elements/accordion/accordion'; |
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
//***************************************************************** | |
// Utilities | |
//***************************************************************** | |
@import 'modules/utilities/grid/grid'; | |
@import 'modules/utilities/colors/colors'; | |
@import 'modules/utilities/container/container'; | |
@import 'modules/utilities/typography/typography'; | |
@import 'modules/utilities/core/core'; | |
@import 'modules/utilities/helpers/helpers'; |
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
@mixin accordion($custom: ()) { | |
$options: map-merge(( | |
panel-bg: #, | |
panel-text-color: # | |
), $custom); | |
.accordion { | |
&__panel { | |
background: map-get($options, panel-bg); |
OlderNewer