LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
<?php
header('Content-type: text/css');
ob_start("compress");

  function compress($buffer) {
    /* remove comments */
      $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);

      /* remove tabs, spaces, newlines, etc. */
      $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);

      return $buffer;
  }

  /* css files for compression */
  include('grid.css');
  include('typography.css');
  include('button.css');
  include('form.css');
  include('table.css');
  include('backgrounds.css');
  include('pagination.css');
  include('breadcrumbs.css');
  include('font.css');
  include('helpers.css');
  include('print.css');
  include('animation.css');
  include('responsive.css');

ob_end_flush();
?>
CSS
body {
  padding: 100px;
  font-size: 16px;
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  line-height: 1.4;
  white-space: pre;
  overflow: auto;
  background-color: #f9f9f9;
  border: 1px solid #ddd;
  padding: .5rem;
  max-height: 800px;
  font-family: monospace;
}
pre code {
  color: inherit;
  background-color: transparent;
  padding: 0;
  display: block;
}
pre .line-number {
  display: block;
  float: left;
  margin: 0 1em 0 -1em;
  border-right: 1px solid #ddd;
  text-align: right;
}
pre .line-number span {
  display: block;
  padding: 0 .5em 0 1em;
  color: #ccc;
}
pre .cl {
  display: block;
  clear: both;
}
JS
(function() {
  var pre = document.getElementsByTagName('pre'),
    pl = pre.length;
  for (var i = 0; i < pl; i++) {
    pre[i].innerHTML = '' + pre[i].innerHTML + '';
    var num = pre[i].innerHTML.split(/\n/).length;
    for (var j = 0; j < (num - 1); j++) {
      var line_num = pre[i].getElementsByTagName('span')[0];
      line_num.innerHTML += '' + (j + 1) + '';
    }
  }
})();
Term
Wed, 12/27/2017 - 06:59

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv