Skip to content

Instantly share code, notes, and snippets.

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

Lucas Bonomi LukyVj

🏠
Working from home
View GitHub Profile
@LukyVj
LukyVj / gist:ab433e989a3a1dfb9318
Created June 12, 2014 15:12
Iconic SASS system
$icons: "phone", "twitter", "email";
@each $icon in $icons {
.ico{
display: block;
&:before{
@include single-element();
@include square(1.2em);
}
&[class*="ico-#{($icon)}"]{
@LukyVj
LukyVj / GeneratedIndexCss.css
Last active August 29, 2015 14:02
Generate indexed lists in SASS
ul li {
list-style: none;
}
ul li:nth-child(1):before, ul li:nth-child(1):after {
display: block;
color: red;
}
ul li:nth-child(1):before {
content: "one > ";
@LukyVj
LukyVj / onoffscreen.js
Last active August 29, 2015 14:02
jQuery :offscreen / :onscreen params
// This code snippet is from : http://stackoverflow.com/questions/8897289/how-to-check-if-element-is-off-screen
jQuery.expr.filters.onscreen = function(el) {
return (
(el.offsetLeft + el.offsetWidth) > 0
|| (el.offsetTop + el.offsetHeight) > 0
|| (el.offsetLeft > window.innerWidth || el.offsetTop < window.innerHeight)
);
};
@LukyVj
LukyVj / introjs_style.scss
Created June 26, 2014 09:25
Neutral intro.js stylesheet
@charset "UTF-8";
.introjs-overlay {
}
.introjs-showElement {
}
@LukyVj
LukyVj / SassIconicSystem.scss
Last active August 29, 2015 14:05
SASS Iconic SVG system
$icons: "facebook", "twitter", "instagram";
$size: 1.2em;
@each $icon in $icons {
.ico{
display: block;
&:before{
content: '';
display: block;
width: $size;
@LukyVj
LukyVj / SassMeister-input.scss
Created October 2, 2014 18:11
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
$font: 'font-a';
@mixin fontWeight($font){
@if($font == 'font-a'){
font-weight: 900;
@LukyVj
LukyVj / Sass_font_weight_snippet.scss
Last active August 29, 2015 14:07
This morning while browsing twitter, I've found a tweet from @davidkaneda : "Does anyone have a CSS trick (ahem, @chriscoyier) for changing font-weight based on available/used font?" And it gave me the idea of this small sass snippet. By the way, this is not what he meant. But it's still cool.
/* This morning while browsing twitter, I've found a tweet from @DavidKaneda :
"Does anyone have a CSS trick (ahem, @chriscoyier) for changing font-weight
based on available/used font?"
And it gave me the idea of this small sass snippet.
By the way, this is not what he meant. But it's still cool.
*/
$font: 'font-a';
$font: 'font-b';
@LukyVj
LukyVj / index.html
Created November 29, 2014 15:13
Material Design Icons
<div class="icons">
<header>
<h2>Material Design Icons</h2>
</header>
<span class="m-icon ic_3d_rotation"></span>
<span class="m-icon ic_accessibility"></span>
<span class="m-icon ic_account_balance"></span>
<span class="m-icon ic_account_balance_wallet"></span>
<span class="m-icon ic_account_box"></span>
@LukyVj
LukyVj / each_and_if.scss
Created December 3, 2014 14:10
How to use an @if condition into an @each control directive in SASS
/* How to use an @if condition into an @each control directive in SASS */
// First, define your variables, here, we'll use colors only.
$c-red : #f44336;
$c-pink: #E91E63;
$c-purple: #9c27b0;
$c-deeppurple: #673ab7;
$c-indigo : #3f51b5;
$c-blue: #2196F3;
$c-lightblue: #03a9f4;
@LukyVj
LukyVj / index.html
Last active August 29, 2015 14:20
Google Web Font SASS Mixin
<h1>Hello World</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tenetur ipsa assumenda officia ipsam numquam maxime fugit, aliquam dolore aliquid soluta veritatis reiciendis doloremque consequuntur eum doloribus commodi! Minima, optio, earum.</p>