0

I'm wanting to do something like:

.devise_links a {
  assign-class: 'btn'
}

Is there any way to do this?

4

2 回答 2

0

No, you need to use Javascript to do that.

But I don't understand the point. Why do you want something like this?

Another thing you can do with SASS is to extend another class though.

于 2013-02-09T22:23:12.660 回答
0

No, but you can achieve that goal using javascript.

But, and I think this may solve your dilemma, why not just create two classes?

For example, in case you didn't know, you can write css like the following:

.devise_links a {
/* your code for all links with the ".devise_links" class  */    
}

.devise_links .device_links_btn a {
/* your code for all links with both the ".devise_links" class and the ".device_links_btn" class */
}

Hope this helps!

于 2013-02-09T22:23:41.920 回答