Skip to content

Instantly share code, notes, and snippets.

View blackfalcon's full-sized avatar
:octocat:
Building things ...

Dale Sande blackfalcon

:octocat:
Building things ...
View GitHub Profile
@blackfalcon
blackfalcon / SassMeister-input-HTML.html
Last active February 10, 2020 21:22
Auro color swatch compare sheet
<div class="flex-outer">
<div class="flex-inner">
<div class="box blackType">These are current colors being used under legacy names</div>
<div class="box blackType gray-100">gray-100 / cloud</div>
<div class="box blackType gray-200">gray-200 / disabled</div>
<div class="box gray-500">gray-500 / orca</div>
</div>
<div class="flex-inner">
@blackfalcon
blackfalcon / SassMeister-output.css
Last active April 2, 2019 00:40
Example @each Sass loop
.icon-success {
background-image: url(/images/icons/success.png); }
.icon-warning {
background-image: url(/images/icons/warning.png); }
.icon-purchase {
background-image: url(/images/icons/purchase.png); }
/* ----------------------------------- */
.bar {
background: red;
}
@blackfalcon
blackfalcon / switch.bash
Last active September 4, 2018 20:34
Easy Git branch switcher in the CLI
# put this in your .bashrc
function switch() {
git branch | grep "$1" | pbcopy && tmp=$(pbpaste) && git checkout $tmp
}
# example branch ... 8038031-update-things-long-branch-name-of-things
# use in the CLI
# $ switch 38031 (or any unique searchable string)
@blackfalcon
blackfalcon / while-loop.scss
Last active January 6, 2018 23:27
example Sass While loop
// ----
// libsass (v0.7.0)
// ----
// example Sass While loop
@import "bourbon/bourbon";
$column: one two three four five six seven;
$length: length($column);
@blackfalcon
blackfalcon / 1_example_mixin.scss
Created May 18, 2012 05:32
That BOOM moment where we discovered the real power of @extend
// We all know how to use mixins, right?
@mixin kung {
background: green;
color: yellow;
}
@mixin foo {
background: orange;
color: red;
<cool>
<p>Hi { message() }</p>
<script>
message() {
return 'there'
}
</script>
<style type="postcss" scoped>
@blackfalcon
blackfalcon / gcd-grid-system.scss
Last active June 6, 2016 00:45 — forked from lunelson/SassMeister-input.scss
Demo of using greatest-common-denominator function to chain extensions of classes in comparison to Stipe's grid output.
// Stipe v0.0.5.7.9
@function gcd($n, $d) {
$num: if($n < $d, $d, $n);
$denom: if($n < $d, $n, $d);
$rem: $num;
$last_rem: $num;
@while $rem != 0 {
$last_rem: $rem;
$rem: $denom % $num;
@blackfalcon
blackfalcon / 01_SassMeister.sass
Last active February 28, 2016 01:06
Extending placeholder selectors within media queries
%myclass
color: blue
@media (min-width: 600px)
background: red
@media (min-width: 800px)
font-size: 28px
.class1
@media (min-width: 600px)
@extend %myclass
@blackfalcon
blackfalcon / _ico-fonts_haml_sass.md
Last active February 28, 2016 00:50
Icon fonts, HAML and Sass

by Dale Sande

Icon-fonts. They are pretty awesome, but much like managing Sprite files, there are issues that make them a real pain to manage. Sure there are full libraries out there that you can grab wholesale and rely on their documentation, but for optimization and performance reasons you do not want to load up a series of libraries just to use a few icons. Leveraging the power of HAML and Sass we can make this less painful and at the same time maintain a living style guide. Basically, winning all over the place.

[IcoMoon][IcoMoon] is a fantastic resource that allows users to select specific icons from various libraries, as well as upload custom SVG art and download a customized font library. In the download package there is an HTML document that illustrates the library you just created, but for most professional applications this isn't going to work. Mainly because you will probably not use IcoMoon's code verbatim. Customizing the HTML and CSS per your use is ve