-
-
Notifications
You must be signed in to change notification settings - Fork 705
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
Rounded corners / border-radius #80
Comments
So, I’ve been thinking about rounded border transitions. Although doing a smooth gradient is allowed by the spec, every browser just does a sharp transition, so let’s do that. Test case: We already have code to clip on a trapezoid shape at the right angle, and with recent changes every border style is painted with a stroke() operation. So we could paint the rounded border by just changing the stroked path to include two arcs. So it’s doable with small-ish changes, and overall much less annoying than I thought it would be. |
It's finally fixed and merged in master! But it needs to be tested with unit tests and real-life tests. Some notes about that:
There's a test file here: http://pastebin.com/RAPYqhQL. You can try it with WeasyPrint and with your favorite browser, I bet that you'll prefer WP! Tests are welcome, and if everything is OK for everybody I'll close the bug. |
I only had a quick look at the test file, but it looks great. Nice work ;) |
Do |
|
http://www.w3.org/TR/css3-background/#corner-shaping
e768778#diff-0 looks wrong. |
I’m also confused by |
I'm blind. Yes, so content rounded box is wrong.
Hmmmm, yes. You'd prefer |
|
Yes, the values are checked in the validator. |
Fixed and released, at least tested in weasysuite. |
Hello, this does not work for me for some reason. This is what I'm doing in the CSS:
In HTML, it renders just fine. Is there anything else I should be checking? Thanks! |
@seven7seven So with the above code, you see no radius at all? What if you apply this to a block (e.g. a |
@seven7seven, also, this issue is closed, so it’s not being tracked anymore. Please open a new issue. |
Thanks @SimonSapin, will try a background-imaged div, and open a new issue with a more detailed description. |
Chapter 5 of css3-background
This is a big-ish item, so start in a feature branch. The steps are roughly:
weasyprint/css/validation.py
andweasyprint/css/computed_values.py
(Section 5.1 of the spec)weasyprint/layout/
(Section 5.2 and 5.5)weasyprint/layout/draw.py
overflow
,clip
, andbackground-clip
properties, still indraw.py
(Section 5.3)draw.py
.The text was updated successfully, but these errors were encountered: