We've been using Galen Framework for this particular "visual testing" problem:
Layout testing seemed always a complex task. Galen Framework offers a
simple solution: test location of objects relatively to each other on
page. Using a special syntax and comprehensive rules you can describe
any layout you can imagine
Galen Framework is designed with responsiveness in mind. It is easy to
set up a test for different browser sizes. Galen just opens a browser,
resizes it to a defined size and then tests the page according to
specifications
We are writing Galen tests in JavaScript, there is a Python port, but not sure how up-to-date it is.
needle is an awesome tool, but images overall are "clumsy" and hard to deal with and maintain. If you make your sizes and resolutions concrete, then it would make things easier.
Using value_of_css_property() is always an option, but it might not scale well and it would be challenging to avoid violating the DRY principle. Think of some sort of an abstraction layer over checking your CSS properties. For instance, have a "style" config in your tests with pre-defined styles with a number of required properties (e.g. every "submit" button in your application needs to have btn and btn-primary classes and needs to have a specific size, font size, background and border colors)..then you can configure a pre-defined style for every page object field in a page object..just thoughts.