CSS function fixes

Made function matching a regex pattern, and moved it to the base file (saw it in another ticket).