0

I am trying to minify the CSS file,

What I am having:

.select02 div.selector .setter.focus:active span,.select02 div.selector .setter:hover:active span, .select02 div.selector .setter.active:hover span, .select02 div.selector .setter.focus.active span{background-position:right -27px;}

Notice in above CSS the class .select02 div.selector are common in all comma separated CSS. I wanted to know that

Is there any way to write CSS like:

.select02 div.selector (.setter.focus:active span, .setter:hover:active span, .setter.active:hover span, .setter.focus.active span){background-position:right -27px;}

I wanted to separate out the common class.



Short Example:
.parentClass .class1, .parentClass .class2, .parentClass .class3 {/* properties*/}

is it possible? or any way to do like this:

.parentClass (.class1, .class2, .class3) {/* properties*/}
Sachink
  • 1,425
  • 10
  • 22
  • 2
    You can't nest like that with pure CSS but you can do it with pre-processors like SASS or Less. – Harry Aug 21 '15 at 07:03
  • Well Paulie_D this is not the duplicate question which you tagged..OP's issue is different so please re open this question..thanx – Leo the lion Aug 21 '15 at 07:24
  • Thanks for suggesting SASS and Less but I am using pure CSS here, @Paulie_D I saw the question you mentioned, but this is not what I am finding the solution. can you please confirm formerly. Thanks! – Sachink Aug 21 '15 at 07:44
  • @Sachink, please have a look at this..may be it will solve your issue https://jsfiddle.net/rngjqq3r/ – Leo the lion Aug 21 '15 at 07:54
  • @Leothelion Thanks! for your comment. but this is not expected a solution. I just wanted to know that, is it possible to take the common class outside like mathematical expression. if Yes then What is the solution, if not then my question is no more to use. – Sachink Aug 21 '15 at 09:02
  • If you are talking about common class means parent class then why don''t you go with parent and then their child class in the way i have used? – Leo the lion Aug 21 '15 at 09:07

0 Answers0