Used to provide structural templates.
Pattern
t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
.clearfix{ zoom: 1;} | |
.clearfix:before, .clearfix:after{ content: ""; display: table;} | |
.clearfix:after { clear: both;} |
<!DOCTYPE html> | |
<html> | |
<!-- <html lang="th"> --> | |
<head> | |
<meta charset="utf-8"/> | |
<!-- | |
<meta name="keywords" content="key1, key2"> | |
<meta name="description" content="des..."> | |
<base target="_blank"></base> | |
--> |
.hidetext { text-indent: 100%; white-space: nowrap; overflow: hidden;} | |
.hidetext2 { font: 0/0 a; text-shadow: none; color: transparent;} |
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
#!/usr/bin/env ruby | |
# An HTTP/HTTPS/FTP file downloader library/CLI based upon MiniPortile's | |
# HTTP implementation. | |
# | |
# Author: Jon Maken | |
# License: 3-clause BSD | |
# Revision: 2012-03-25 21:18:59 -0600 | |
require 'net/http' | |
require 'net/https' if RUBY_VERSION < '1.9' |
window.onload = function() { | |
window.setTimeout(function() { | |
var p = window.performance, t, output, ns; | |
if (!p || !p.timing) { | |
output = '<p>Sorry, you browser doesn\'t support the Navigation Timing API.</p>'; | |
} else { | |
t = p.timing; | |
ns = t.navigationStart; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>CSS responsive images</title> | |
<style> | |
/* Doesn't stop original source image being | |
downloaded too */ | |
@media (min-device-width:600px) { |
There seems to be a difference between longhand properties (e.g. background-color
) and shorthand properties (e.g. background
). Some CSS hacks only work for one or the other. I’ve updated my test case to test these separately, and there are some interesting results.
The following hacks target IE8 but not IE9:
longhandproperty: \0value\0;
longhandproperty: \0value;
In practice, you might use these like so:
background-color: \0red\0;