News for hackers. Stuff that matters.
Re:CSS-only plotting by BoppreH on Thursday October 23, 2014 @04:53PM (#8500690)
I loved the simplicity, and wanted to know how it was done.

https://github.com/asciimoo/cssplot/blob/master/cssplot.css

  .bar-chart ul li[data-cp-size="0"] {
  height: 0%;
  }
  .bar-chart ul li[data-cp-size="1"] {
  height: 1%;
  }
  .bar-chart ul li[data-cp-size="2"] {
  height: 2%;
  }
  ...
Still find it cool, but a 1200 line CSS may be a bit too much for a practical application.
Re:CSS-only plotting by aligajani on Thursday October 23, 2014 @05:02PM (#8500732)
Just shows what CSS can do but won't use it in production.
Re:CSS-only plotting by Myztiq on Thursday October 23, 2014 @05:13PM (#8500789)
Eventually once browser support is there we can reduce this to about 70 lines. By using

.scatterplot ul li[data-cp-y] { bottom: attr(data-cp-y %); }

Re:CSS-only plotting by TazeTSchnitzel on Thursday October 23, 2014 @05:59PM (#8500993)
I really wish browsers supported the second attribute of attr(). None do.
Re:CSS-only plotting by OutThisLife on Thursday October 23, 2014 @07:32PM (#8501317)
This will be so awesome.
Re:CSS-only plotting by girvo on Thursday October 23, 2014 @10:30PM (#8501862)
Converting it to a LESS mixin (or similar) would be interesting, it'd allow you to bring in only the needed styles for the graphs you've used :)
Re:CSS-only plotting by notjustanymike on Friday October 24, 2014 @10:09AM (#8503700)
Checking the source code, it actually starts out as LESS
Re:CSS-only plotting by evanm on Thursday October 23, 2014 @08:09PM (#8501445)
Couldn't this be reduced by, like, a lot by simply using this CSS3 gem?

height: attr(sata-cp-size px);

Re:CSS-only plotting by bennettfeely on Thursday October 23, 2014 @08:15PM (#8501460)
Someday, but right now the support for using 'attr()' function in properties other than 'content' is very poor.
Re:CSS-only plotting by nness on Thursday October 23, 2014 @09:13PM (#8501645)
Correct, attr() for use with anything than the content property is unsupported by most browsers.

(https://developer.mozilla.org/en-US/docs/Web/CSS/attr)

Re:CSS-only plotting by RussianCow on Thursday October 23, 2014 @08:15PM (#8501461)
Yes, once we get to the point where we can stop supporting IE <= 9. :)
Re:CSS-only plotting by JoelSutherland on Friday October 24, 2014 @10:40AM (#8503874)
It's very redundant so it gzips to 3kb.