Can I theme the menubar to look different if a window is maximized?

I know you can theme the Unity menubar in GTK+3 using CSS, but is there a way to theme it differently depending on whether a window is maximized?

This would be useful for e.g. themes where the menubar should appear standalone in the absence of a maximized window, but then seamlessly blend into the top of such a window when there is one.

Preferably, I would like to be able to do this from within the theme files.


I don't believe this is possible outside of the exit, minimize and maximize buttons. But it may be.