Refer slides on Speaker Deck at https://speakerdeck.com/peterwilsoncc/specificity-smacss-and-wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<noscript><link rel="stylesheet" href="base64images.css"></noscript> | |
</head> | |
<body> | |
<p> Hello World </p> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* refer to: http://wordpress.org/extend/plugins/rapid-adn-widget/ */ | |
.adnpost { | |
margin-bottom: 1em; | |
} | |
.adnpost__datestamp { | |
display:block; | |
/* maybe */ text-align:right; /* too */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#js-mediaquery { | |
overflow: hidden; | |
width: 1px; | |
height: 1px; | |
position: absolute; | |
top: -999999em; | |
left: auto; | |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ | |
clip: rect(1px, 1px, 1px, 1px); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(typeof(RapidTwitter)=='undefined'){RapidTwitter={};} | |
RapidTwitter.generate_html = function(screen_name, tweets){ | |
var the_html = ''; | |
for (var i=0, l=tweets.length; i<l; i++) { | |
var use_tweet = tweets[i], | |
rt_html = '', | |
classes = ['tweet']; | |
if (typeof use_tweet.user.screen_name == 'undefined') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.avoid-ids { | |
width: 200px; height: 50px; /* for demo */ | |
background-color: #ddd; | |
border: solid #999; | |
border-width: 0 1px 1px 0; | |
border: 0 solid rgba(0,0,0,0); | |
-webkit-box-shadow: 0 2px 2px rgba(0,0,1,.25); | |
box-shadow: 0 2px 2px rgba(0,0,1,.25); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PWCC = this.PWCC || {}; | |
console = this.console || {}; | |
console.log = this.console.log || function(){}; | |
console.error = this.console.error || function(){}; | |
(PWCC.exe = function(window, document, $) { | |
var html = document.documentElement, | |
body = html.getElementsByTagName('body')[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PWCC = this.PWCC || {}; | |
console = this.console || {}; | |
console.log = this.console.log || function(){}; | |
console.error = this.console.error || function(){}; | |
(PWCC.exe = function(window, document, $) { | |
var html = document.documentElement, | |
body = html.getElementsByTagName('body')[0]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Child Theme's functions.php */ | |
function collaborate_class_init() { | |
class Collaborate extends Collaborate_Parent_Theme { | |
public static function theme() { | |
if ( ! Collaborate::$instance instanceof self ) { | |
Collaborate::$instance = new self(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add_action( action_name, callback, priority ) { | |
if ( ! priority ) { | |
priority = 10; | |
} | |
if ( priority > 100 ) { | |
priority = 100; | |
} | |
if ( priority < 0 ) { |