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
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;
@trongthanh
trongthanh / Gruntfile.js
Created August 18, 2014 10:36
Working with HTML Forms Demo
/*jshint node: true*/
module.exports = function (grunt) {
'use strict';
// mannual grunt task loading:
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
// install and turn on package below to automatically load grunt tasks listed in the initConfig
// require('load-grunt-tasks')(grunt);
@trongthanh
trongthanh / AppView.js
Last active March 2, 2017 16:41
Maintainable JavaScript - From Zero to Hero
define(
['TodoItem'],
function(TodoItem) {
'use strict';
// constants
var ENTER_KEY = 13;
function AppView($el) {
this.$el = $el;
@trongthanh
trongthanh / dabblet.css
Created October 23, 2014 07:19
Position Property & Absolute Positioning Context Demo
/**
* Position Property & Absolute Positioning Context Demo
*/
div {
padding: 10px;
}
.main {
width: auto;
border: 5px solid lightgreen;
background-color: AliceBlue;