separate style from thumbnail logic in css