This file contains hidden or 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
module.exports = function(str) { | |
return function(style) { | |
style.rules = style.rules.map(function(rule) { | |
if (rule.declarations) { | |
rule.declarations.forEach(function(decl, i) { | |
var token; | |
if (decl.comment) { | |
token = decl.comment.trim(); | |
if (token.charAt(0) === '$') { | |
rule.declarations[i+1].value = token; |
This file contains hidden or 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
@texty-inputs: ~'input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="date"], input[type="month"], input[type="time"], input[type="datetime"], input[type="datetime-local"], input[type="week"], input[type="number"], input[type="search"], input[type="tel"], input[type="color"]'; | |
.pure-form { | |
@{texty-inputs} { | |
display: block; | |
} | |
} | |
// yields |
This file contains hidden or 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
$texty-inputs: | |
'input[type="text"], | |
input[type="password"], | |
input[type="email"], | |
input[type="url"], | |
input[type="date"], | |
input[type="month"], | |
input[type="time"], | |
input[type="datetime"], | |
input[type="datetime-local"], |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title> - jsFiddle demo</title> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css"> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.9.1/build/cssnormalize/cssnormalize-min.css"> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.9.1/build/cssfonts/cssfonts-min.css"> | |
<style type="text/css"> | |
body { |
This file contains hidden or 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 MyColorThing() {}; | |
MyColorThing.prototype = { | |
complement: function(color) { | |
return Y.Color.getComplementary(color); | |
} | |
}; |
This file contains hidden or 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
/* | |
Usage: | |
var grid = new Grid({ | |
units: [ | |
'1/2', | |
'1/4', | |
'1/4' | |
], |
This file contains hidden or 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
#box1 { | |
float: left; | |
width: 100px; | |
} | |
#box2 { | |
overflow: hidden; /* auto-size to remaining width */ | |
} |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<style> | |
#demo { | |
overflow: hidden; | |
} | |
.fix { |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>YUI Base Page</title> | |
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?3.1.1/build/cssfonts/fonts-min.css&3.1.1/build/cssreset/reset-min.css&3.2.0pr1/build/cssgrids/grids-min.css"> | |
<script type="text/javascript" charset="utf-8" | |
src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"> | |
</script> |
This file contains hidden or 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title>YUI Base Page</title> | |
<link rel="stylesheet" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css"> | |
<style> | |
.yui-u { | |
height: 100%; /* snap to height of grid */ |
NewerOlder