Add class to new posts with Views
You may want to simply make use of the existing field available in views called:


  Content: Has new content  values
  Add that as a field or use it to customize another field, it is pretty handy.


Some more information on what constitutes as NEW or UPDATED:
for how long is Content considered &quot;new&quot; by the filter criteria &quot;Content: has new content&quot;?