JSFiddle - React, Tailwind, and code Playground

by abernier

HTML

<h1><a href="https://gist.github.com/1097177">gist</a> CSS3pattern</h1>
fetched in here!
<p><small><a href="https://github.com/LeaVerou/CSS3-Patterns-Gallery/issues/2">github.com/LeaVerou/CSS3-Patterns-Gallery/issues/2</small><p>

CSS

html, body {height:100%;}
html {display:table; width:100%;}
body {display:table-cell; text-align:center; vertical-align:middle;}

CoffeeScript

(($) ->
    yQuery = "USE 'http://gist.github.com/raw/1097256' AS github.gist.content; select * from github.gist.content where gist_id='#{1097177}'"
    yQuery = encodeURIComponent(yQuery)

    url = "http://query.yahooapis.com/v1/public/yql?q=#{yQuery}&format=json&diagnostics=true&callback=?"

    $.getJSON(url, (data) ->
        css = data?.query?.results?.content
        
        $('body').attr('style', css) if css
    )
)(jQuery)