LoginSignup
1
1

More than 3 years have passed since last update.

LESSの使い方-概要-

Last updated at Posted at 2018-08-08

CSSをわかりやすい形で記述できるというLESS。
CSSで丁寧に書いていたところをHTMLのような階層に分けて記述することもできます。
より感覚的に記述できるということが特徴ですね!
また、変数を指定できることやHTMLを塊で修飾できる組を作ることもできます。

例えば


div{
   width:40px;
   margin:0 auto;
}

div h2{
    font-size:27px;
    color:red;
}

div a{
    font-size:15px;
    background:url("")
}

以下はlessのコードになります。


div{
  width:40px;
  margin:0 auto;

   h2{
    font-size:27px;
    color:red;

    a{
     font-size:15px;
     background:url("")
  }
 }
}

といったところです。
HTMLと対応させやすく、視覚的にわかりやすいです。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1