Set style name automatically