Skip to content

Instantly share code, notes, and snippets.

View thedaviddias's full-sized avatar
🌍

David Dias thedaviddias

🌍
View GitHub Profile
// HTML:
<div class="display-type"></div>
// CSS:
// set the content of an element depending on the media query
@thedaviddias
thedaviddias / SassMeister-input.scss
Created July 10, 2014 21:48
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
$themeName: Z;
@mixin theme($themeName) {
@if $themeName == z {
@content;
'use strict';
var gulp = require( 'gulp' ),
gutil = require( 'gulp-util' ),
fork = require( 'child_process' ).fork,
tinyLr = require( 'tiny-lr' ),
async = require( 'async' );
var dirs = {
app: [
<iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?hl=ru&amp;ie=UTF8&amp;output=embed&amp;q={address}"></iframe>
@thedaviddias
thedaviddias / rem
Created August 11, 2014 04:20 — forked from xonic/rem
// Mixin that allows to specify arbitrary CSS properties with
// unitless numbers. The output has rem unit with pixel fallback.
// Shorthand assignments are supported too!
$base_line: 10;
@mixin rem($property, $values, $important:"")
{
// Placeholder variables
$shorthand_px: "";
$shorthand_rem: "";
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@thedaviddias
thedaviddias / SassMeister-input.scss
Created August 17, 2014 20:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
$program: beinggirl;
$category-name: mybody mylife mycircle mystyle create;
@mixin program($theme) {
@if $theme == $program {
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?
@thedaviddias
thedaviddias / sass.md
Last active August 29, 2015 14:09 — forked from Integralist/sass.md

Directory structure

  • Sass
    • x
      • module.scss
      • module.scss
    • y
      • module.scss
      • module.scss
  • z
@thedaviddias
thedaviddias / SassMeister-input.scss
Last active August 29, 2015 14:10
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
// sass 3.4.7
$program: test1;
@mixin program($programName) {