CSS patterns for functionalities commonly done with js