Posted in linux
5257
8:33 am, March 18, 2021
 

Creating a chart about charts.css with charts.css from the command line

Creating a chart about charts.css with charts.css from the command line:

BASH

 (
      echo "<table class='charts-css bar show-labels show-heading'>"
      echo "<caption>Size of Charts.css releases</caption>"
      for version in $(curl -sS https://github.com/ChartsCSS/charts.css/releases | grep -o releases/tag/[0-9.]* | cut -d/ -f3 | tac); do
        url=https://cdn.jsdelivr.net/npm/charts.css@$version/dist/charts.min.css
        size=$(($(curl -sS "$url" | wc -c)/1024))
        echo "<tr><th>v$version</th><td style='--size: calc($size/100)'>${size}KiB</td></tr>"
      done
      echo "</table><link rel=stylesheet href='$url'>"
    ) > size-chart.html

Result: https://jsfiddle.net/wcfez6oq/

This is untested but thought it was cool, saved from here : https://news.ycombinator.com/item?id=26494819 

View Statistics
This Week
64
This Month
423
This Year
503

No Items Found.

Add Comment
Type in a Nick Name here
 
Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
The happiest People don't have the best of everything, they just make the best of everything.
Unknown
Random CSS Property

text-underline-offset

The text-underline-offset CSS property sets the offset distance of an underline text decoration line (applied using text-decoration) from its original position.
text-underline-offset css reference