better stylesheet detection