Skip to content

Instantly share code, notes, and snippets.

View vasilisvg's full-sized avatar

Vasilis van Gemert vasilisvg

View GitHub Profile
@vasilisvg
vasilisvg / dabblet.css
Created February 10, 2016 22:13
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
li:nth-last-child(n+6),li:nth-last-child(6) ~ li {
color: green;
}
@vasilisvg
vasilisvg / dabblet.css
Created November 19, 2013 12:56
How should multicolumn work?
/**
* How should multicolumn work?
*/
body {
width: 98vw;
margin: 0;
padding: 0; }
article {
padding: 2em;
@vasilisvg
vasilisvg / dabblet.css
Created August 22, 2013 18:49
Untitled
.prev {color:green}
[rel=prev] {color: blue}
@vasilisvg
vasilisvg / kick-it.php
Last active December 21, 2015 11:39
Random song by the Beastie Boys as a Kick It link, instead of wasting your visitors' time with silly social media buttons. Based on the excellent idea by @heejeroen http://twitter.com/heejeroen/status/370199786722705408
<?php
$kickit = array(
'qORYO0atB6g', //Intergalactic
'z5rRZdiu1UE', //Sabotage
'uvRBUw_Ls2o', //Body Movin'
'BptQHAW2T5M', //Shake Your Rump
'eBShN8qT4lk', //(You Gotta) Fight For Your Right (To Party)
'07Y0cy-nvAg', //No Sleep Till Brooklyn
'Xf1YF_MH1xc', //Root Down
'evA-R9OS-Vo', //Fight For Your Right (Revisited)
@vasilisvg
vasilisvg / NL-stylen met css.md
Last active December 13, 2015 16:58
Example text for and about styling texts with CSS.

Dit is een heading van het eerste niveau. De belangrijkste kop van de pagina

Dit is de eerste paragraaf. Je kan deze paragraaf anders stylen. Dit is een goed idee als de eersre paragraaf altijd een samenvatting is van de rest van het artikel. Als de eerste paragraaf gewoon een eerste paragraaf is dan is het niet nodig om hem anders te stylen. Een groter font of vetgedrukte tekst wordt we gebruikt. Maar dat is natuurlijk aan jou, de designer, om te beslissen. Als je het niet zeker weet, bespreek de betekenis van de eerste paragraaf dan met je collega's. Als je geen content guide hebt die duidelijk uitlegt waar de eerste paragraaf voor staat, style hem dan niet.

Dit is een heading van het tweede niveau, voor subsecties van artikelen.

Dit is een paragraaf die direct na een heading 2 staat. Je kan de relatie tussen een heading 2 en een paragraaf stylen. Je zou er bijvoorbeeld voor kunnen kiezen om de marge tussen de paragraaf en de heading te verkleinen. Zo creëer je de illusie van een gegroepeerd blo

@vasilisvg
vasilisvg / list-letters.js
Created November 21, 2015 09:24
List all letters used on a page.
var text = document.body.innerText;
var letters = '';
var i = 0;
while ( i < text.length ) {
var isithere = letters.split(text[i]);
if (isithere.length == 1) {
letters += text[i];
}
i++;
}
@vasilisvg
vasilisvg / dabblet.css
Created November 25, 2012 12:47
A common navigational menu
/**
* A common navigational menu
*/
nav {
margin: 0 auto;
font: 100%/1.5 arial;
}
ul {
margin: 0;
padding: 0;
@vasilisvg
vasilisvg / dabblet.css
Created November 24, 2012 15:48
Hover button
/**
* Hover button
*/
a {
font: 2em arial;
display: inline-block;
text-decoration: none;
color: #fff;
margin: 2em 0 0 2em;
@vasilisvg
vasilisvg / user-style-app-net.css
Created October 27, 2012 20:25
Optimized user style for alpha.app.net on a small screen
/* your source here */
@media (max-width: 600px) {
body {
padding: 45px 0 150px !important;
}
.hero-unit {
display: none;
}
.newpost {
position: fixed;
@vasilisvg
vasilisvg / acceptable-retina-images.md
Created July 16, 2012 18:32
Acceptable Retina Images

#Retina images Sharpness is relative. We can only observe if something is really sharp if we can see it next to something that's sharper. Lots of people are looking for solutions for the problem that images look blurry on retina displays. All solutions I've seen so far give the advice to send an image that's twice as wide and twice as high to these new screens. Before you start sending these images, be sure to understand that these files will be four times the size of the smaller version. People with a high end device and a low end connection—everybody in the train in The Netherlands—will hate you.

##Image types I'm generalizing here, but there are two types of images: (1) graphics like logos and (2) photos. Quadroupled images might be justified for the first kind, for logos, icons, things like that. You could also try to find a solution in clever SVG files—with media queries in them, why not? These kinds of ima