This file contains hidden or 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
// http://www.antimath.info/css/sass-sqrt-function/ | |
@function sqrt($r) { | |
$x0: 1; | |
$x1: $x0; | |
@for $i from 1 through 10 { | |
$x1: $x0 - ($x0 * $x0 - abs($r)) / (2 * $x0); | |
$x0: $x1; | |
} |
This file contains hidden or 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
/// Contexts | |
/// @author Loïc Goyet | |
/// @param {Unit} $element1 | |
/// @param {Unit} $element2 | |
/// @param {Bool} $invert | |
/// @warn the params $big-element & $small-element must share the same type of | |
/// unit | |
@function get-diff-to-align($element1, $element2, $invert: true) { | |
$big-element: if($element1 > $element2, $element1, $element2); | |
$small-element: if($element1 > $element2, $element2, $element1); |
This file contains hidden or 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 gulp = require('gulp'); | |
var inject = require('gulp-inject'); | |
gulp.task('inject', function () { | |
var target = gulp.src('index.html'); | |
// It's not necessary to read the files (will speed up things), we're only after their paths: | |
var sources = gulp.src(['style.css', 'script.js'], {read: false}); | |
return target.pipe(inject(sources)) | |
.pipe(gulp.dest('result.html')); |