Sha256: 19193df4ffd183673c1dcb78345b23e407ac469337c3c841ff413bd1cea65614

Contents?: true

Size: 1.48 KB

Versions: 14

Compression:

Stored size: 1.48 KB

Contents

<html>
  <head>
    <!--<link rel="stylesheet/stylus"></link>-->
    <style type="text/stylus">
fg = white
body {
  color: fg;
  background: black;
}
    </style>
    <script src="../stylus.js"></script>
    <script>

    function createStylesheet(css) {
      var el = document.createElement('style');
      el.type = 'text/css';
      el.media = 'screen';
      el.id = 'todo';
      el.textContent = css;
      document.getElementsByTagName('head')[0].appendChild(el);
    }

    onload = function(){
      var styles = document.getElementsByTagName('style')
        , indent
        , styl;

        // TODO: link tags like https://github.com/cloudhead/less.js/blob/master/dist/less-1.1.4.js#L2463
        // TODO: strip indentation
      for (var i = 0, len = styles.length; i < len; ++i) {
        if ('text/stylus' == styles[i].type) {
          styl = styles[i].textContent;
          stylus(styl.trim())
            .render(function(err, css){
              if (err) throw err;
              createStylesheet(css);
            });
        }
      }
    };
    </script>
  </head>
  <body>
    <div id="dialog">
      <h1>Dialog</h1>
      <p>Some random dialog</p>
    </div>

    <div class="tip username-tip">Please enter your username</div>
    <div class="tip password-tip">Please enter your password</div>
    <div id="content">
      <p><input type="text" class="username" placeholder="Username:"></p>
      <p><input type="text" class="password" placeholder="Password:"></p>
    </div>
  </body>
</html>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
stylus-source-0.21.2 vendor/testing/index.html
stylus-source-0.21.1 vendor/testing/index.html
stylus-source-0.20.1 vendor/testing/index.html
stylus-source-0.19.8 vendor/testing/index.html
stylus-source-0.19.7 vendor/testing/index.html
stylus-source-0.19.6 vendor/testing/index.html
stylus-source-0.19.5 vendor/testing/index.html
stylus-source-0.19.4 vendor/testing/index.html
stylus-source-0.19.3 vendor/testing/index.html
stylus-source-0.19.2 vendor/testing/index.html
stylus-source-0.19.1 vendor/testing/index.html
stylus-source-0.19.0 vendor/testing/index.html
stylus-source-0.18.0 vendor/testing/index.html
stylus-source-0.17.0 vendor/testing/index.html