Support CSS logical properties
I was trying to change the indent amount of bullet points with css, and padding-inline-start worked well for me in my browser preview. It isn't, however, recognized in weasyprint:
WARNING: Ignored `padding-inline-start: 0.13in\` at 102:9, unknown property.
I'm sure I can figure out another way to do this, but I thought it'd be helpful to have this noted.
Yeah, in the meantime I can just use negative left margin. The stackoverflow answer that told me to use padding-inline-start is from 2015, so it is also possible that this isn't what people are using nowadays? I'm not currently smart enough to know how to find out.
Hi
Logical properties are not supported in WeasyPrint yet. Until then, you can use padding-left or padding-right instead, depending on the direction of your text.
Add a list of unsupported features (with possible workarounds) to the top level of the documentation. Currently it's hidden here.
Hi!
Add a list of unsupported features (with possible workarounds) to the top level of the documentation.
Giving orders to maintainers is not the proper way to behave here. We’re here to discuss about how to improve WeasyPrint, not to blindly fulfill your specific needs. If we add something at the top level of the documentation each time someone finds it "hidden" in the documentation, we’ll just get everything hidden at the top.
The main reason we currently don’t have a list of unsupported features is that the list of CSS properties is really long and regularly changes. Following all these changes takes a lot of time, and we don’t want to spend this time to update the documentation each time the W3C adds a feature. It’s already hard to maintain the documentation up to date when we add new features!
(Does this list exist for other browsers? That would be a good source of inspiration.)
What we currently do is to list the specifications we implement, with a list of supported and unsupported properties. It only covers the specifications we partially or fully implement, so we don’t have to add documentation for the brand new drafts when they are released. We already try to update the documentation when specifications are updated and properties are added or removed.
We also asked Can I Use if they were interested in listing the supported properties for WeasyPrint (and other CSS print implementations), but they gently refused. Maybe we’ll create Can I Print one day, that’s been a real idea we discussed about some time ago, but it’d take a lot of resources.
Currently, if you want to know if a property is supported, you can type it in the search form of the documentation. If you find it, then the documentation will tell, otherwise it’s not supported. This is not perfect, but for us it avoids to maintain multiple lists, and it still gives the possibility to users to find an answer quite quickly.
If you’d like to talk more about this topic, please open a new issue, and let’s keep this issue about supporting logical properties.
Thanks for your answers, I'll respond in a random order:
- Having a prominent position on the state and support would actually help to manage expectations.
- "Can I Use" might comes first to mind but actually it's way behind for many modern features. I would't recommend it anymore. At least for browsers Mozilla BCD is the better source. This is comparable to a browser specific list you've asked for. Since they also include JS Engines (Node, Deno, Bun) it might be a better fit.
- Having CSS functions / keywords etc. would be a huge benefit. But from my point of view this shouldn't be done in a extra doc for example. the way is certainly to enforce it by adding it to the source code and make a CI will fill if things are missing. I'm aware that this would be initially a huge task. But afterwards it would guarantee an up to date documentation.