Skip to content

Instantly share code, notes, and snippets.

@shancarter
Created January 6, 2017 04:52
Show Gist options
  • Save shancarter/e06d265151673611c09849f7673d49a6 to your computer and use it in GitHub Desktop.
Save shancarter/e06d265151673611c09849f7673d49a6 to your computer and use it in GitHub Desktop.
HTML as CSS
h1{This is a Head}
h2{This is an h2}
p{This is an implied p element.}
p{This is another one.}
p{It's just like html but with significant whitespace.}
p{What about b{inline} tags?}
p{And that's about it, although it would allow you to do more complicated stuff.}
h2{More Complicated Stuff}
p.foo{You can add classes to elements.}
div{
p{You can also nest content.}
p{This is a child paragraph.}
p{This is another child paragraph.}
}
p{Back to the parent context.}
p{What about if you want to a[href=http://google.com]{link} to stuff?}
p{Want to do a list?}
ul{
li{ First item
li{ Second item
p#id.class{You can add an id as well as a class.}
input[type=checkbox]{Attributes are cool too.}
h2{Comments}
p{Obviously, comments would be allowed.}
//This would not be in the output.
h2{Scripts}
p{What about blocks of code?}
script{{
let x = 25;
let y = 15;
console.log()
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment