Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blog/css-grid-bar-charts #13

Open
utterances-bot opened this issue Jun 7, 2022 · 4 comments
Open

blog/css-grid-bar-charts #13

utterances-bot opened this issue Jun 7, 2022 · 4 comments
Labels

Comments

@utterances-bot
Copy link

Creating dynamic bar charts with CSS grid - Josh Collinsworth blog

How to use CSS grid to make a responsive, adaptable bar chart with no math or external library required!

https://joshcollinsworth.com/blog/css-grid-bar-charts

Copy link

chezchez commented Jun 7, 2022

Totally awesome Josh!
Thanks for sharing.
I will definitely use it!

Copy link

hey68you commented Jun 7, 2022

Really cool - I was also thinking about this good use case!

side point - maybe you know why as in your screenshot: https://joshcollinsworth.com/images/post_images/grid-auto-columns.png

when you set grid-auto-colums: 1fr

then the grid columns indicators on top skip #2 ???

Copy link

rachelbt commented Jun 8, 2022

Great article and use of grid.
I think you can upgrade your code by using css-variables in your inline-style.
in the css:
grid-column: var(--col-span);
inside the HTML:
<li style="--col-span: 9">
https://codepen.io/rachelbt/pen/BaYObgr

Copy link

rachelbt commented Jun 8, 2022

sorry - for the css:
grid-column: span var(--col-span);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants