Skip to content

Instantly share code, notes, and snippets.

View grahamlicence's full-sized avatar

Graham Licence grahamlicence

  • 101 Ways
  • London
View GitHub Profile
// --------------------------------------------------
// Flexbox LESS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
// flex or inline-flex
.flex-display(@display: flex) {
display: ~"-webkit-@{display}";
display: ~"-moz-@{display}";
{
/*
based on google style guide preset:
https://raw.githubusercontent.com/jscs-dev/node-jscs/master/presets/google.json
modifications for mini digital:
- "validateIndentation" set to 4, rather than the google default of 2
- "maximumLineLength" removed, rather than the google default of 80
- "disallowSpacesInAnonymousFunctionExpression.beforeOpeningCurlyBrace" replaced with "requireSpacesInAnonymousFunctionExpression.beforeOpeningCurlyBrace"
- because this isn't explicitly specified in the google style guide,
{
"bitwise": false,
"browser": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"es3": true,
"esnext": true,
"expr": true,
"forin": true,
Sublime Text Packages
A few recommended packages:
“DocBlockr"
Allows you to easily write comments in the format:
/**
*
*/
“EditorConfig"
@grahamlicence
grahamlicence / disqus.html
Created March 17, 2016 11:14
Load Disqus comments on click
<button class="disqus-button">View comments</button>
<div id="disqus_thread"></div>
<script async="true">
var disqus_config = function () {
this.page.url = YOUR_PAGE_URL;
this.page.identifier = YOUR_PAGE_IDENTIFIER;
},
button = document.getElementsByClassName('disqus-button')[0],
loadDisqus = function(e) {
e.preventDefault();