calculate common css rules for placeholder