cirilla
KPCKevin Powell - Community
•Created by cirilla on 12/29/2023 in #front-end
Clip a image given xyhw
I have a spritesheet like image, and I only want to show a certain part of it.
I have the top, left, height and width of this part within the image, and I want the image to be 1em wide (this is different than the pixel width of the clipped section). The image() function with the xyhw seems like what I want, but it's not supported in browsers yet.
How do I do this?
2 replies
KPCKevin Powell - Community
•Created by cirilla on 9/25/2023 in #front-end
CSS grid, setting maximum span
Is there a way to set a max value for CSS grid-column: span such that it takes up n-columns maximum or spans across all available columns if there are fewer than that?
If I use span in a grid with auto-fill it'll forces additional columns even when there isn't space for any and makes them look weird.
7 replies