html - Possible to nest within &:before using SASS? -


Trying to use sass for the condition of the phantom: I have to show each card, but before the method & Amp ;: Using the method, I can only get one visa. Do not I nest in .visa / .mastercard / .amex & first:

  & lt; Div class = "saved_cc_block" & gt; & Lt; Div class = "saved_cc" & gt; & Lt; One class = "cc_img visa" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; Div class = "saved_cc" & gt; & Lt; One class = "cc_img mastercard" & gt; & Lt; / A & gt; & Lt; / Div & gt; & Lt; / Div & gt;  


  .cc_img {status: relative; Height: 26 pixels; Left: 9 pixels; Padding-left: 50px; & Amp ;: {Content: ""; Status: Completed; Width: 41px; Height: 26 pixels; Top: 50%; Left: 0; Background: URL ('http://i.imgur.com/3zRD5fn.png') No-repeat; .visa {background-position: 0; } .mastercard {background-position: -51px 0; } .amex {background-position: -102px 0; }}  

Before :

  .cc_img {position: relative; Height: 26 pixels; Left: 9 pixels; Padding-left: 50px; & Amp ;: {Content: ""; Status: Completed; Width: 41px; Height: 26 pixels; Top: 50%; Left: 0; Background: URL ('http://i.imgur.com/3zRD5fn.png') No-repeat; }}. Visa: First {background-position: 0; } .master card: first {background-position: -51px 0; } .amex: first {background-position: -102px 0; }  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -