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
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
//---------------component style-------------------- | |
//my-widget.scss | |
.my-widget { | |
//in French it should look like this | |
.fr & { |
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
// ---- | |
// Sass (v3.3.0.rc.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
#sidebar %link { | |
text-decoration: underline; | |
} | |
p %link { | |
color: blue; |
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
// ---- | |
// Sass (v3.3.0.rc.3) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin ie6 { | |
//the & is context selector passed in from caller | |
.ie6 & { | |
@content; | |
} |
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
// ---- | |
// Sass (v3.3.0.rc.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@function combine($prefix, $list) { | |
$temp: ""; | |
$n: length($list); | |
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
var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/; | |
function jsonStringToDate(string) { | |
var match; | |
if (match = string.match(R_ISO8061_STR)) { | |
var date = new Date(0), | |
tzHour = 0, | |
tzMin = 0; | |
if (match[9]) { | |
tzHour = int(match[9] + match[10]); |
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 getStyle(element, key) { | |
var node = element[0]; | |
return node.currentStyle ? | |
node.currentStyle[key] : | |
$window.getComputedStyle(node)[key]; | |
} |
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 isScope(obj) { | |
return obj && obj.$evalAsync && obj.$watch; | |
} |
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
// ---- | |
// Sass (v3.4.9) | |
// Compass (v1.0.1) | |
// ---- | |
$themes: ( | |
brand1: ( | |
color: yellow |
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 evalObjectPath(hostObj, pathExpression) { | |
var parts = pathExpression.split('.'); | |
for (var i = 0; i < parts.length; i++) { | |
var value = hostObj[parts[i]]; | |
if (value === undefined) { | |
return hostObj; | |
} else { | |
hostObj = value; | |
} | |
} |
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
'use strict'; | |
app.filter('random', function () { | |
function randomInt(min, max) { | |
return Math.round(Math.random() * (max - min) + min); | |
} | |
return function (items) { | |
var i = randomInt(0, items.length - 1); |