NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
import sublime, sublime_plugin | |
class CopyScopeCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
sublime.set_clipboard(self.view.scope_name(self.view.sel()[0].begin())) | |
sublime.status_message("Copied scope") | |
def is_enabled(self): | |
return self.view.sel() |
// if you have a link in your HTML that points to a sound: <a href="http://soundcloud.com/matas/hobnotropic">My Track</a> | |
// it will convert them to our new HTML5 widgets | |
$('a[href*="soundcloud.com"]').each(function(){ | |
var $link = $(this); | |
$.getJSON('http://soundcloud.com/oembed?format=js&url=' + $link.attr('href') + '&iframe=true&callback=?', function(response){ | |
$link.replaceWith(response.html); | |
}); | |
}); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Responsive Design Testing</title> | |
<style> | |
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; } | |
.wrapper { width: 6000px; } | |
.frame { float: left; } | |
h2 { margin: 0 0 5px 0; } |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
@mixin ie6 { * html & { @content } } | |
#logo { | |
background-image: url("/images/logo.png"); | |
@include ie6 { background-image: url("/images/logo.gif"); } | |
} |