Skip to content

Instantly share code, notes, and snippets.

View Gaya's full-sized avatar
🌱
Coding on plants

Gaya Kessler Gaya

🌱
Coding on plants
View GitHub Profile
@Gaya
Gaya / Extendingcompoundselectors.scss
Created June 17, 2014 13:34
Extending compound selectors
//Is it possible to extend placeholder classes and their nested compound selectors?
%list {
margin: 12px 0;
&__item {
padding: 0 5px;
}
}
.main {
@Gaya
Gaya / video-ratio.css
Created October 15, 2014 09:19
Keep video aspect ratio while scaling
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 0px; /* You can add the interface buttons' room here if any */
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
@Gaya
Gaya / vertical-rhytmn.scss
Created November 21, 2014 21:37
Vertical Rhytmn Mixin
/*
* Vertical Rhythmn in Sass with helpful mixins and helpers
* Author: Gaya Kessler
* Version: 0.0.2
* Date: 2014-11-20
*/
@if variable-exists(base-font-size) == false {
$base-font-size: 16px;
}
@Gaya
Gaya / content.php
Created January 28, 2015 14:50
One of the many reasons I hate WordPress development
global $post;
$post = get_post($id);
setup_postdata($post);
global $more;
$more = 1;
$content = get_the_content(false);
@Gaya
Gaya / SassMeister-input.scss
Created August 5, 2015 07:27
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin admin-bar {
$selector: &;
@at-root {
body.admin-bar {
#{$selector} {
@content;
@Gaya
Gaya / SassMeister-input.scss
Created August 5, 2015 07:32
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
@mixin prepend-selector($pre-selector) {
$selector: &;
@at-root {
#{$pre-selector} {
#{$selector} {
@content;
@Gaya
Gaya / jquery.placeholdereasy.js
Created March 19, 2012 15:00
Placeholder script jQuery
/*
* Short jQuery method of making placeholders for all the browsers.
*
* Use the following HTML markup to make this work:
* <input type="text" class="placeholder" value="Your name" data-standard="Your name" />
*/
$(".placeholder").focus(function () {
if ($(this).val() == $(this).attr("data-standard")) {
$(this).val("").addClass("active"); //Add class for other styling
@Gaya
Gaya / anchorhashcheck.js
Created November 8, 2012 16:04
Check anchors for href="#"
$("a[href=#]").each(function () {
console.log(this);
});
@Gaya
Gaya / SassMeister-input.scss
Created December 16, 2013 12:29
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
.michiel {
color: #ffffff;
}
.gaya {
@Gaya
Gaya / vatchecker.js
Last active December 31, 2015 12:29
var vatchecker = {
img: "",
req: "",
vat_checking: "",
init: function () {
vatchecker.vat_checking = $("#vat_checking .validated");
$("#vat_nr_check").keyup(function () {
var country = "BE";