Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add circle-crop variation to Image block. (#16475)
* Add circle-crop variation to Image block. Props @phpbits for the technical implementation. This PR adds a variation to the Image block, "Circle Crop". What that means is you can choose a style variation for the image, which rounds all 4 corners. When this is appliedto a square image, that means a perfect circle. When it is applied to a rectangle, it means a pill-shape. In past attempts to fix this, it was either an oval crop, or it required a large refactor to be able to make a rectangular image into a square, in CSS only. But with @phpbits clever trick — using a pixel value for the border radius — the we can actually implement this in a simple way that is still visually appealing even for rectangles. * If the browser supports it, use the mask CSS property to create this effect. * Rename to "Circle Mask" * Remove unintentional code comment.
- Loading branch information