Skip to content

Instantly share code, notes, and snippets.

View hileon's full-sized avatar

Leon Zhang hileon

View GitHub Profile
@hileon
hileon / gist:2212460
Created March 27, 2012 04:10 — forked from blau/gist:27831
markdown syntax
Markdown: Syntax
================
* [Overview](#overview)
* [Philosophy](#philosophy)
* [Inline HTML](#html)
* [Automatic Escaping for Special Characters](#autoescape)
* [Block Elements](#block)
* [Paragraphs and Line Breaks](#p)
* [Headers](#header)
@hileon
hileon / common.less
Created March 27, 2012 04:07 — forked from danieleli/common.less
less / css - common functions
.clear_margin_padding() {
margin: 0 !important;
padding: 0 !important;
padding-left: 0px !important;
padding-right: 0px !important;
}
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
@hileon
hileon / mixins.less
Created March 27, 2012 04:07 — forked from chrisgaunt/mixins.less
LESS CSS Mixins
.box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: @x @y @blur @color;
-moz-box-shadow: @x @y @blur @color;
-webkit-box-shadow: @x @y @blur @color;
}
.inset-box-shadow(@x: 0, @y: 1px, @blur: 1px, @color: #000) {
box-shadow: inset @x @y @blur @color;
-moz-box-shadow: inset @x @y @blur @color;
-webkit-box-shadow: inset @x @y @blur @color;
@hileon
hileon / mixins.less
Created March 27, 2012 04:07 — forked from andreruffert/mixins.less
LESS CSS mixins Collection
.border-radius(@radius:15px)
{
-webkit-border-radius:@radius;
-moz-border-radius:@radius;
border-radius:@radius;
}
.multi-rounded-corners(@topLeft: 5px, @topRight: 5px, @bottomRight: 5px, @bottomLeft: 5px)
{
-webkit-border-radius: @topLeft @topRight @bottomRight @bottomLeft;
@hileon
hileon / .css3_gradient
Created March 27, 2012 04:06
less css transition
.css3_gradient(@from, @to, @fallback: @to) {
background-color:@fallback;
background-image:-webkit-gradient(linear, left top, left bottom, from(@from), to(@to));
background-image:-webkit-linear-gradient(top, @from, @to);
background-image:-moz-linear-gradient(top, @from, @to);
background-image:-ms-linear-gradient(top, @from, @to);
background-image:-o-linear-gradient(top, @from, @to);
background:linear-gradient(to left bottom, @from, @to);
}
@hileon
hileon / roundedCorners.less
Created March 27, 2012 04:05 — forked from jackreichert/roundedCorners.less
LessCSS Rounded Corners
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}
@hileon
hileon / gist:2212440
Created March 27, 2012 04:05 — forked from quoidautre/gist:2203635
LESSCSS: font-face
@font-face {
font-family: 'OpenSans-Bold';
src: url('../fonts/OpenSans-Bold.ttf');
font-weight: normal;
font-style: normal;
}
.fonts (@the-font:"OpenSans-CondLight",@size:14px) {
font-weight: normal;
font-style: normal;
@hileon
hileon / _css3.scss
Created March 27, 2012 03:49
LESSCSS CSS3 Mixins
///*---------------------------------------------------------------------*/
.mixin-border-radius(@topleft:5px,@topright:5px,@bottomright:5px,@bottomleft:5px) {
border-top-left-radius: @topleft;
border-top-right-radius: @topright;
border-bottom-right-radius: @bottomright;
border-bottom-left-radius: @bottomleft;
-moz-border-radius-topleft: @topleft;
-moz-border-radius-topright: @topright;
-moz-border-radius-bottomright: @bottomright;
-moz-border-radius-bottomleft: @bottomleft;
@hileon
hileon / _css3.scss
Created March 27, 2012 03:49
SASS CSS3 Mixins
///*---------------------------------------------------------------------*/
@mixin border-radius($topleft:5px,$topright:null,$bottomright:null,$bottomleft:null) {
@if $topright != null and $bottomright != null and $bottomleft != null {
border-top-left-radius: $topleft;
border-top-right-radius: $topright;
border-bottom-right-radius: $bottomright;
border-bottom-left-radius: $bottomleft;
-moz-border-radius-topleft: $topleft;
-moz-border-radius-topright: $topright;
-moz-border-radius-bottomright: $bottomright;
@hileon
hileon / gist:2212339
Created March 27, 2012 03:48 — forked from paulfarning/gist:609330
CSS3 rolled corners
.section {
border: 4px solid #fff;
margin: 100px;
padding: 10px 20px;
overflow: hidden;
width: 310px;
background-image: -moz-linear-gradient(top, #f6f2ec, #e2dbce); /* FF3.6 */
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, #f6f2ec),color-stop(1, #e2dbce)); /* Saf4+, Chrome */
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f6f2ec', EndColorStr='#e2dbce'); /* IE6,IE7 */