Modified syncCssClasses to use output of adapter when applying a class rather than applying the original class