Skip to content

Instantly share code, notes, and snippets.

View Panya's full-sized avatar
🐗
boaring

Panya

🐗
boaring
View GitHub Profile
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.App exposing (..)
import Dom
import Task
type Msg
= Click
| NoOp
@Panya
Panya / SassMeister-input.scss
Created April 3, 2015 17:34
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
.component{
color: red;
@at-root{
#{&}--foo#{&}--bar {
color: blue;
@Panya
Panya / SassMeister-input.scss
Created February 3, 2015 23:35
Generated by SassMeister.com.
// ----
// Sass (v3.4.11)
// Compass (v1.0.3)
// ----
$min-height: 60px;
body {
min-height: calc( $min-height * 1.3 );
}
@Panya
Panya / SassMeister-input.scss
Created November 21, 2014 17:12
Generated by SassMeister.com.
// ----
// libsass (v3.0.1)
// ----
@each $name, $code in (user: "\e600", group: "\e601") {
%icon-#{$name} {
content: $code;
}
}
diff --git a/docs/extend.md b/docs/extend.md
index a0e037f..92b18c6 100644
--- a/docs/extend.md
+++ b/docs/extend.md
@@ -185,3 +185,20 @@ Yielding:
}
Note that if the selector is not extended, it won't be in the resulting CSS, so it's a powerful way to create a library of extendable code. While you can insert code through mixins, they would insert the same code every time you use them, while extending placeholders would give you compact output.
+
+## Optional extending
@Panya
Panya / SassMeister-input.scss
Created June 24, 2014 22:59
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$map: (key1: value1, key2: value2, key3: value3);
body {
prop1: bar;
prop2: map-get($map, 'foo');
@Panya
Panya / bench
Last active August 29, 2015 14:01
preprocessors benchmark
html {
overflow: hidden;
&:before {
position: absolute;
top: 50%;
left: 50%;
margin: -10em;
border: dashed 2px;
width: 20em;
height: 20em;
html {
overflow: hidden;
&:before {
position: absolute;
top: 50%; left: 50%;
margin: -10em;
border: dashed 2px;
width: 20em; height: 20em;
border-radius: 50%;
transform: skewX(20deg);
jscoverage lib lib-cov
STYLUS_COV=1 make REPORTER=html-cov > coverage.html
make[328]: /bin/sh: Resource temporarily unavailable
make[328]: *** wait: No child processes. Stop.
make[328]: *** Waiting for unfinished jobs....
make[328]: *** wait: No child processes. Stop.
make[327]: *** [test-cov] Error 2
make[326]: *** [test-cov] Error 2
make[325]: *** [test-cov] Error 2
make[324]: *** [test-cov] Error 2
diff --git a/lib/functions/index.js b/lib/functions/index.js
index fb55b71..7211a6c 100644
--- a/lib/functions/index.js
+++ b/lib/functions/index.js
@@ -1106,64 +1106,24 @@ exports.selector = function selector(sel){
return stack.length ? utils.compileSelectors(stack).join(',') : '&';
};
-function prefixNode(prefix, node) {
- switch (node.nodeName) {