-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Add support for border-image-source and border-image-slice. #2125
Conversation
That’s great, thanks a lot! The code seems to be almost perfect. ❤️ I’ll fix a couple of things and push small commits so that you can easily track what I’ve changed. I think that we’ll merge this PR just after 62 is released (hopefully on Friday), because it already contains a lot of features and may cause a lot of bug reports. |
Great, thanks for your review! |
Avoid mutating border_image_slice while drawing image borders.
We usually don’t explain specifications in tests for "simple" cases.
It looks like I’ve changed a lot of lines, but the modifications are actually minor. Thanks a lot, that’s a great pull request! 🙏🏽 Here are the commits I’ve added:
I also rebased the branch on top of "main", mainly to use and check the new linting rules. If you want to support other properties, don’t hesitate to add new commits to this PR, we have some time before we merge it. There’s also the |
I believe my existing change to |
I believe this now supports all the border-image-* properties, including some basic test coverage. |
I missed that!
Thank you! If everything is OK, it may even be ready for version 62. |
Thanks a lot for this pull request. All the relevant tests of the W3C testing suite pass. 🚀 We could add more drawing tests in WeasyPrint, but the code is already in very good shape and W3C tests give a good reason to be optimistic. Let’s merge if everything’s OK for you! |
Sounds great! This works for my needs, so I'd be happy for it to be merged. Thanks for your work to improve this as well! |
This adds basic support for border-image-source and border-image-slice.
This is sufficient for common uses of image borders in CSS.
It does not yet support non-default values for border-image-width, border-image-outset, or border-image-repeat, which I plan on addressing in future pull requests.
This is my first substantial contribution, so let me know if I should be putting this logic in a different place or otherwise approaching it differently. Thanks for your review!
First part of #2124.