Skip to content

Instantly share code, notes, and snippets.

View hileon's full-sized avatar

Leon Zhang hileon

View GitHub Profile
@hileon
hileon / base.css
Created August 4, 2010 01:20 — forked from sofish/base.css
css reset
@charset "utf-8";
/*
@名称: base
@功能: 重设浏览器默认样式
@例子: null
*/
/* 防止用户自定义背景颜色对网页的影响 */
html{
@hileon
hileon / gist:1311735
Created October 25, 2011 07:39 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@hileon
hileon / h5bp-twitter-bootstrap
Created March 27, 2012 03:37 — forked from paulirish/h5bp-twitter-bootstrap
h5bp + twitter bootstrap integration
#!/bin/sh
echo "
Cool, let's start.
"
src=$PWD
@hileon
hileon / dabblet.css
Created March 27, 2012 03:47
CSS3 selectors
/**
* CSS3 selectors
*/
p:first-child {
color: blue;
}
p:last-child {
color: red;
@hileon
hileon / CSS3 Media Queries Template
Created March 27, 2012 03:47
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@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 */
@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 / _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 / 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 / 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;
}