[css-images] [css-shapes] create simple fill-able/stroke-able CSS images
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
Possible solutions for creating simple fill-able/stroke-able CSS images have been mentioned here and there in other issues but I've not yet seen an issue specifically for this kind of conversation so this is that. These conversations seem to fall into 2 main categories:
- use
<basic-shape>insideimage() - make SVG creation with CSS easier
use <basic-shape>
ex. fill and/or stroke a circle: a 45px diameter circle, filled with red and stroked with a 3px black line
background-image: image( circle(45px at 22.5px 22.5px, red, 3px black) );
background-position: center center;
background-repeat: no-repeat;
- imagining the stroke to be added on the inside of the circle like
borderdoes in CSS by default? - options to fill/stroke with color, gradient, or gradient pattern??
other random thoughts
@image-manipulationwould allow cutting shapes from gradient images with clip-path but being able to just create the shapes as images would skip a step for the browser.- does the current stripe proposal fall in here as well?
- compositing shapes?
make a CSS like syntax for creating SVG images
https://yuanchuan.dev/experimenting-a-new-syntax-to-write-svg
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two approaches outlined in this issue: using inside image() and making SVG creation easier with CSS-like syntax. Review the linked SVG syntax experiment and the questions about fill, stroke, gradients, patterns, and compositing. Done would require a settled direction and a sufficiently specified CSS proposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100