Skip to content

Instantly share code, notes, and snippets.

Nicolas Gallagher necolas

Block or report user

Report or block necolas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@necolas
necolas / generated-ie-only.css
Last active Aug 29, 2015
Problem with extracting IE-specific CSS into separate stylesheet.
View generated-ie-only.css
.a {
background: red;
}
@necolas
necolas / generated-ie.css
Last active Aug 29, 2015
Generating isolated IE-specific stylesheet
View generated-ie.css
.a {
background: red;
/* dropped linear gradient based on IE CSS support (like what autoprefixer does) */
zoom: 1;
}
.b {
background: green;
}
@necolas
necolas / MyComponent.css
Created Apr 15, 2014
SUIT CSS spacing with variables
View MyComponent.css
:root {
--margin-MyComponent-part: var(--theme-margin-small);
}
.MyComponent {}
.MyComponent-part {
margin: var(--margin-MyComponent-part);
}
View flight-groups.js
var TweetBox = defineComponent(function() {
this.attributes({
charLimit: 140
withGeoControl: false;
});
if (withGeoControl === true) {
// attach to a sub node
this.child(GeoControl).attachTo('.GeoControl');
}
@necolas
necolas / webpack-pre-css-loader.js
Created Sep 8, 2014
webpack-pre-css-loader.js
View webpack-pre-css-loader.js
var path = require('path');
/**
* CSS transform dependencies
*/
var autoprefixer = require('autoprefixer-core');
var calc = require('rework-calc');
var color = require('rework-color-function');
var conformance = require('rework-suit-conformance');
@necolas
necolas / production.css
Last active Aug 29, 2015
"atomic css" as compiled output
View production.css
.abcd {
align-items: center;
}
.efgh {
background: blue;
}
.ijkl {
color: red;
@necolas
necolas / functions.php
Created Jun 17, 2010
Wordpress custom retweet and save buttons
View functions.php
// Adds custom retweet and delicious buttons to Wordpress template
// Uses bit.ly, delicious, backtype, tweetmeme, and topsy APIs
// Adapted from Backtype Tweetcount plugin
// Nicolas Gallagher / @necolas
function tweet_save($url) {
global $post;
$url = '';
$btype_cnt = null;
$topsy_cnt = null;
@necolas
necolas / CustomView.jsx
Last active Sep 15, 2015
React Web Style-API
View CustomView.jsx
import ReactWebStyle, {WebComponent} from 'react-web-style';
import React, {PropTypes} from 'react';
import {Text, View} from 'react-web-sdk';
const styles = {
root: {
borderColor: 'red',
padding: '10px',
position: 'absolute',
@necolas
necolas / style.css
Created Apr 27, 2011 — forked from shichuan/style.css
css descriptions
View style.css
/**
* HTML5 ✰ Boilerplate
*
* style.css contains a reset, font normalization and some base styles.
*
* Credit is left where credit is due.
* Much inspiration was taken from these projects:
* - yui.yahooapis.com/2.8.1/build/base/base.css
* - camendesign.com/design/
* - praegnanz.de/weblog/htmlcssjs-kickstart
@necolas
necolas / style.css
Created Jun 14, 2011
HTML5 Boilerplate a la normalize.css
View style.css
/* =============================================================================
HTML5 element display
========================================================================== */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio[controls], canvas, video { display: inline-block; *display: inline; *zoom: 1; }
/* =============================================================================
Base
You can’t perform that action at this time.