Use library for css, remove deprecated function