You can see from your comment that you already understood this, but PyQuery does not provide this function.
The css method (line 824 in pyquery.py) only sets the attributes and cannot get what is a shame. Although, given that PyQuery does not work with a list of styles, the usefulness of restoring CSS is limited anyway.
Manually sorting p.attr(style) results p.attr(style) be the best way at the moment. I would like to see a parameter for extracting css values if only one argument is passed to the css method, but we will see.
Nick tomlin
source share