Just shows what CSS can do but won't use it in production.
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.
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
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.
Correct, attr() for use with anything than the content property is unsupported by most browsers.
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.
https://github.com/asciimoo/cssplot/blob/master/cssplot.css
Still find it cool, but a 1200 line CSS may be a bit too much for a practical application.