Skip to content

Instantly share code, notes, and snippets.

@beatak
Created September 2, 2014 20:08
Show Gist options
  • Save beatak/d79c25a5a068c264f2da to your computer and use it in GitHub Desktop.
Save beatak/d79c25a5a068c264f2da to your computer and use it in GitHub Desktop.
@namespace svg "http://www.w3.org/2000/svg";
@charset "UTF-8"; /* Set the encoding of the style sheet to Unicode UTF-8 */
@charset 'iso-8859-15'; /* Set the encoding of the style sheet to Latin-9 (Western European languages, with euro sign) */
a {
margin : auto;
padding : 0;
}
.foo[bar="baz,quz"] {
foobar: 123;
}
.bar,
#bar[baz="qux,foo"],
#qux {
foobar: 456;
}
.baz[qux=",foo"],
.baz[qux="foo,"],
.baz[qux="foo,bar,baz"],
.baz[qux=",foo,bar,baz,"],
.baz[qux=" , foo , bar , baz , "] {
foobar: 789;
}
.qux[foo='bar,baz'],
.qux[bar="baz,foo"],
#qux[foo="foobar"],
#qux[foo=',bar,baz, '] {
foobar: 012;
}
#foo[foo=""],
#foo[bar=" "],
#foo[bar=","],
#foo[bar=", "],
#foo[bar=" ,"],
#foo[bar=" , "],
#foo[baz=''],
#foo[qux=' '],
#foo[qux=','],
#foo[qux=', '],
#foo[qux=' ,'],
#foo[qux=' , '] {
foobar: 345;
}
.foo:matches(.bar,.baz),
.foo:matches(.bar, .baz),
.foo:matches(.bar , .baz),
.foo:matches(.bar ,.baz) {
prop: value;
}
.foo:matches(.bar,.baz,.foobar),
.foo:matches(.bar, .baz,),
.foo:matches(,.bar , .baz) {
anotherprop: anothervalue;
}
/* 1 */
head, /* footer, */body/*, nav */ { /* 2 */
/* 3 */
/**/foo: 'bar';
/* 4 */
} /* 5 */
/* 6 */
a {
color/**/: 12px;
padding/*4815162342*/: 1px /**/ 2px /*13*/ 3px;
border/*\**/: solid; border-top/*\**/: none\9;
}
/* http://foo.com/bar/baz.html */
/**/
foo { /*/*/
/* something */
bar: baz; /* http://foo.com/bar/baz.html */
}
@custom-media --narrow-window (max-width: 30em);
@custom-media --wide-window screen and (min-width: 40em);
@-moz-document url-prefix() {
/* ui above */
.ui-select .ui-btn select {
/* ui inside */
opacity:.0001
}
.icon-spin {
height: .9em;
}
}
/* tests compressed for easy testing */
/* http://mathiasbynens.be/notes/css-escapes */
/* will match elements with class=":`(" */
.\3A \`\({}
/* will match elements with class="1a2b3c" */
.\31 a2b3c{}
/* will match the element with id="#fake-id" */
#\#fake-id{}
/* will match the element with id="---" */
#\---{}
/* will match the element with id="-a-b-c-" */
#-a-b-c-{}
/* will match the element with id="©" */
#©{}
/* More tests from http://mathiasbynens.be/demo/html5-id */
html{font:1.2em/1.6 Arial;}
code{font-family:Consolas;}
li code{background:rgba(255, 255, 255, .5);padding:.3em;}
li{background:orange;}
#♥{background:lime;}
#©{background:lime;}
#“‘’”{background:lime;}
#☺☃{background:lime;}
#⌘⌥{background:lime;}
#𝄞♪♩♫♬{background:lime;}
#\?{background:lime;}
#\@{background:lime;}
#\.{background:lime;}
#\3A \){background:lime;}
#\3A \`\({background:lime;}
#\31 23{background:lime;}
#\31 a2b3c{background:lime;}
#\<p\>{background:lime;}
#\<\>\<\<\<\>\>\<\>{background:lime;}
#\+\+\+\+\+\+\+\+\+\+\[\>\+\+\+\+\+\+\+\>\+\+\+\+\+\+\+\+\+\+\>\+\+\+\>\+\<\<\<\<\-\]\>\+\+\.\>\+\.\+\+\+\+\+\+\+\.\.\+\+\+\.\>\+\+\.\<\<\+\+\+\+\+\+\+\+\+\+\+\+\+\+\+\.\>\.\+\+\+\.\-\-\-\-\-\-\.\-\-\-\-\-\-\-\-\.\>\+\.\>\.{background:lime;}
#\#{background:lime;}
#\#\#{background:lime;}
#\#\.\#\.\#{background:lime;}
#\_{background:lime;}
#\.fake\-class{background:lime;}
#foo\.bar{background:lime;}
#\3A hover{background:lime;}
#\3A hover\3A focus\3A active{background:lime;}
#\[attr\=value\]{background:lime;}
#f\/o\/o{background:lime;}
#f\\o\\o{background:lime;}
#f\*o\*o{background:lime;}
#f\!o\!o{background:lime;}
#f\'o\'o{background:lime;}
#f\~o\~o{background:lime;}
#f\+o\+o{background:lime;}
/* css-parse does not yet pass this test */
/*#\{\}{background:lime;}*/
@font-face {
font-family: "Bitstream Vera Serif Bold";
src: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");
}
body {
font-family: "Bitstream Vera Serif Bold", serif;
}
@host {
:scope {
display: block;
}
}
@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;
@import 'custom.css';
@import "common.css" screen, projection;
@import url('landscape.css') screen and (orientation:landscape);
@import url("fineprint.css") print;
@import url("bluish.css") projection, tv;
@import 'custom.css';
@import "common.css" screen, projection ;
@import url('landscape.css') screen and (orientation:landscape);
@keyframes fade {
/* from above */
from {
/* from inside */
opacity: 0;
}
/* to above */
to {
/* to inside */
opacity: 1;
}
}
@keyframes advanced {
top {
opacity[sqrt]: 0;
}
100 {
opacity: 0.5;
}
bottom {
opacity: 1;
}
}
@keyframes foo {
0% { top: 0; left: 0 }
30.50% { top: 50px }
.68% ,
72%
, 85% { left: 50px }
100% { top: 100px; left: 100% }
}
@keyframes fade {from
{opacity: 0;
}
to
{
opacity: 1;}}
@-webkit-keyframes fade {
from { opacity: 0 }
to { opacity: 1 }
}
@media screen, projection {
/* html above */
html {
/* html inside */
background: #fffef0;
color: #300;
}
/* body above */
body {
/* body inside */
max-width: 35em;
margin: 0 auto;
}
}
@media print {
html {
background: #fff;
color: #000;
}
body {
padding: 1in;
border: 0.5pt solid #666;
}
}
@media screen, projection{ html
{
background: #fffef0;
color:#300;
}
body
{
max-width: 35em;
margin: 0 auto;
}
}
@media print
{
html {
background: #fff;
color: #000;
}
body {
padding: 1in;
border: 0.5pt solid #666;
}
}
body { foo
:
'bar' }
body{foo:bar;bar:baz}
body
{
foo
:
bar
;
bar
:
baz
}
@namespace "http://www.w3.org/1999/xhtml";
@namespace svg "http://www.w3.org/2000/svg";
tobi loki jane {
are: 'all';
the-species: called "ferrets"
}
/* toc above */
@page toc, index:blank {
/* toc inside */
color: green;
}
@page {
font-size: 16pt;
}
@page :left {
margin-left: 5cm;
}
tobi loki jane {
are: 'all';
the-species: called "ferrets";
*even: 'ie crap';
}
body {
background: url('some;stuff;here') 50% 50% no-repeat;
}
foo {
bar: 'baz';
}
tobi {
name: 'tobi';
age: 2;
}
loki {
name: 'loki';
age: 1;
}
foo,
bar,
baz {
color: 'black';
}
@supports (display: flex) or (display: box) {
/* flex above */
.flex {
/* flex inside */
display: box;
display: flex;
}
div {
something: else;
}
}
.wtf {
*overflow-x: hidden;
//max-height: 110px;
#height: 18px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment