Skip to content

Instantly share code, notes, and snippets.

View trongthanh's full-sized avatar
🎈
Keep calm and code on

Thanh Tran trongthanh

🎈
Keep calm and code on
View GitHub Profile
@trongthanh
trongthanh / dabblet.css
Created June 24, 2014 15:41
Essential CSS Training - Cascading & Specificity
/**
* Essential CSS Training - Cascading & Specificity
*/
html {
font-family: sans-serif;
font-size: 200%;
}
.blue {
color: blue;
/**
* Float Demo
*/
html {
font-family: sans-serif;
font-size: 150%;
color: #666;
}
.container {
@trongthanh
trongthanh / dabblet.css
Last active August 29, 2015 14:03
Clear Fix Demo
/**
* Clear Fix Demo
*/
html {
font-family: sans-serif;
font-size: 150%;
}
.container {
background: #aaddaa;
@trongthanh
trongthanh / dabblet.css
Last active August 29, 2015 14:03
Box Model Demo 2
/**
* Box Model Demo 2
*/
/*
* {
box-sizing: border-box;
}*/
/*html, body {
height: 100%;
}*/
@trongthanh
trongthanh / dabblet.css
Created July 8, 2014 14:07
Box Model Demo 1
/**
* Box Model Demo 1
*/
/*
What properties will affect a block element's outer size?
*/
.box1 {
float: left;
color: red;
@trongthanh
trongthanh / dabblet.css
Created July 11, 2014 08:47
Color inheritance experiment
/**
* Color inheritance experiment
*/
html {
color: magenta;
font-size: 120%;
}
input, button, p, select {
font-size: inherit;
@trongthanh
trongthanh / dabblet.css
Created July 25, 2014 10:01
Demo - CSS Text and Typography
/*
* Demo - CSS Text and Typography
*/
body {
font-family: Helvetica, Arial, Open Sans, sans-serif;
font-size: 16px;
font-weight: normal;
font-style: normal;
}
@trongthanh
trongthanh / dabblet.css
Created August 3, 2014 04:44
Stacking Context Demo
/**
* Stacking Context Demo
*/
* { box-sizing: border-box; }
body { font-size: 20px; font-family: sans-serif; }
div {
border: 1px dashed black;
min-width: 10em;
min-height: 5em;
padding: 0.5em 1em;
@trongthanh
trongthanh / dabblet.css
Created August 3, 2014 05:22
Position Property & Positioning Context Demo
/**
* Position Property & Positioning Context Demo
*/
div {
padding: 10px;
}
.main {
width: auto;
border: 5px solid lightgreen;
background-color: AliceBlue;
@trongthanh
trongthanh / dabblet.css
Created August 5, 2014 00:57
Position Property & Positioning Context Demo
/**
* Position Property & Positioning Context Demo
*/
div {
padding: 10px;
/*NOTE: box-sizing is natural (content-box)*/
}
.main {
width: auto;
border: 5px solid lightgreen;