extract some styles to common part