Skip to content

Instantly share code, notes, and snippets.

View jasonmelgoza's full-sized avatar
🏠
Working from home

Jason Melgoza jasonmelgoza

🏠
Working from home
View GitHub Profile
html{
background-image: linear-gradient(#0ff 1px, transparent 1px);
background-size: auto 1.5em;
}
/**
* 1. http://www.paulirish.com/2012/box-sizing-border-box-ftw/
* http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
* http://fatihhayrioglu.com/css3-box-sizing-ozelligi/
*
* 2. http://aestheticallyloyal.com/public/optimize-legibility/
*
* 3. http://maxvoltar.com/archive/-webkit-font-smoothing
*
* 4. http://maximilianhoffmann.com/posts/better-font-rendering-on-osx
// http://css-tricks.com/transitions-only-after-page-load/
.preload *
-webkit-transition: none !important
-moz-transition: none !important
-ms-transition: none !important
-o-transition: none !important
<script>
$(window).resize(function() {
var windowWidth = $(window).width();
$('.screen-width').text(windowWidth + 'px');
});
</script>
<div id="debug" style="position:fixed;padding:0.3em 0.6em;background:#f1f1f1;font-size:0.6em;bottom:0;left:50%;">
<span class="screen-width">0</span>
</div>
@mixin font-size($percent, $min-font-size, $max-font-size) {
// Min
font-size: $min-font-size;
@include breakpoint($min-font-size/$percent * 100) {
font-size: #{$percent}vw;
}
@include breakpoint($max-font-size/$percent * 100) {
font-size: $max-font-size;
.is-truncate {
width: 250px; /** Adjust width to your needs */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

A quick visual reference to every ColorBrewer scale; colors by Cynthia Brewer. Available in CSS and JS format. Click on a palette to log the constituent colors in hexadecimal RGB to the console.

{
"directory" : "public/components",
"json" : "component.json",
"endpoint" : "https://bower.herokuapp.com",
"searchpath" : ["https://bower.herokuapp.com"]
}