Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Adventures with SASS ampersand Reply To: [Solved] Adventures with SASS ampersand

#189443
Paulie_D
Member

In the style block for .a {} – I want to check if this class is attached to a particular tag. If that tag is a p tag I want to alter the styles for that scenario.

CSS can’t ‘check’ anything…it can only style based on a selector.

http://codepen.io/Paulie-D/pen/yyNmrJ

Basically, I don’t think you can define what you are after within the ‘a’ style block….it just doesn’t work that way….AFAIK.