Posted in linux
5247
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
54
This Month
413
This Year
493

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


seren spirit :(
Random CSS Property

scroll-snap-align

The scroll-snap-align property specifies the box's snap position as an alignment of its snap area (as the alignment subject) within its snap container's snapport (as the alignment container). The two values specify the snapping alignment in the block axis and inline axis, respectively. If only one value is specified, the second value defaults to the same value.
scroll-snap-align css reference