Anil Kumar
Anil Kumar

Reputation: 229

How to convert a piece of CSS code to LESS css

I am using LESS css in my code. But i am not able to write this in LESS.

.A .B div.span4 a, .A .B div.span12 a, .A .B div.span6 a 
{
    background: none repeat scroll 0 0 #3b5998;
    color: @white;
    display: block;
    font-family: Verdana,Geneva,sans-serif;
    font-size: @font-size-base;
    padding: 5px 10px;
}

Upvotes: 1

Views: 98

Answers (2)

Luca Detomi
Luca Detomi

Reputation: 5716

More optimized:

.A .B 
{
  div.span4,
  div.span12,
  div.span6
  {
    a 
    {
        background: none repeat scroll 0 0 #3b5998;
        color: @white;
        display: block;
        font-family: Verdana,Geneva,sans-serif;
        font-size: @font-size-base;
        padding: 5px 10px;
    }
  }
}

Upvotes: 2

Tharaka Karunarathne
Tharaka Karunarathne

Reputation: 65

If you are a Windows user you can use 3rd party softwares like Winless. Also there are some online tools such as Css2less, Lessify

Upvotes: 2

Related Questions