Skip to content

[css-borders-4] Add a way to turn off border image slicing #9734

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

Open
SebastianZ opened this issue Dec 20, 2023 · 1 comment
Open

[css-borders-4] Add a way to turn off border image slicing #9734

SebastianZ opened this issue Dec 20, 2023 · 1 comment

Comments

@SebastianZ
Copy link
Contributor

As noted in different places like #9183, #9714 or https://css-tricks.com/understanding-border-image/#comments, the 9-slice scaling algorithm behind border images is hard to grasp for authors.
Also, it doesn't cover use cases like adding an image that spans the whole border image area.

Therefore, an option should be added that allows to choose a different algorithm to render the border image across the whole border image area without slicing it.

One way could be to introduce a new property border-image-layout with the values slice and no-slice (names obviously to be bikeshedded).

no-slice causes border-image-slice to have no effect on the image and that the image defined in border-image-source is displayed within the border image area as a whole. border-image-repeat then tiles the whole image. The other border-image-* properties behave the same.

That covers the use cases mentioned in #8802 and #9456, in particular.

Sebastian

@jsnkuhn
Copy link

jsnkuhn commented Oct 23, 2024

why the new property? Couldn't this just be done as "border-image-slice: none;"

you mention that this covers multi layer support for border-image (#8802) but give no details. How would this cover multiple images? How would it cover image sizing and positioning like the background- properties?

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

No branches or pull requests

2 participants