Skip to content

Instantly share code, notes, and snippets.

@cahnory
cahnory / css3.less
Last active December 11, 2015 22:58
LESS functions
/**
* LESS css3 functions
*
* LICENSE
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@cahnory
cahnory / dabblet.css
Created December 5, 2012 11:07
A11y navigation — toc & map
/**
* A11y navigation — toc & map
*/
.menu {
background: #333;
}
.menu li {
position: relative;
}
@cahnory
cahnory / dabblet.css
Created December 5, 2012 09:06
CSS Perspective shadow
/**
* CSS Perspective shadow
*/
.wrapper {
margin: 2em auto;
max-width: 960px;
}
.box {
background: #444;
@cahnory
cahnory / dabblet.css
Created November 11, 2012 14:27
Slide navigation
/**
* Slide navigation
*/
html, body {
margin: 0 auto;
}
.wrapper {
margin: 0 auto;
height: 320px;
width: 240px;
@cahnory
cahnory / dabblet.css
Created October 27, 2012 17:36
Slide navigation
/**
* Slide navigation
*/
html, body {
margin: 0 auto;
}
.wrapper {
margin: 0 auto;
height: 320px;
width: 240px;
@cahnory
cahnory / String.php
Created October 26, 2012 11:25
Consistent PHP string object
<?php
class String implements Countable
{
const emptyString = NULL;
const defaultEncoding = 'UTF-8';
const pregFlag = 'u';
/**
* The String content
@cahnory
cahnory / dabblet.css
Created October 3, 2012 08:14
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.image1 {
background: red;
font-size: 10px;
height: 1em;
transition: all 1s;
width: 1em;
@cahnory
cahnory / gist:3786811
Created September 26, 2012 08:33
How I manage text basics
html {
font-size: 62.5%; -webkit-text-size-adjust: 62.5%; -ms-text-size-adjust: 62.5%;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
font-smoothing: antialiased;
}
body {
font: 1em/1.5 Arial, sans-serif;
}
@cahnory
cahnory / dabblet.css
Created September 13, 2012 22:23
HoverScroll
/**
* HoverScroll
*/
.wrapper {
margin: 0 auto;
width: 450px;
}
.hScroll {
@cahnory
cahnory / dabblet.css
Created September 13, 2012 17:01
HTML product pattern
/**
* HTML product pattern
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;