LoginSignup
0
0

More than 5 years have passed since last update.

Riot Pug Sass Typescriptで楽にWebページ・アプリを開発 (何が便利か編)[Pug編]

Last updated at Posted at 2017-10-28

親記事

主要な機能

HTMLの < > 及び 綴じタグ を廃止する。
インデントで階層を表現する。

従来のHTMLとの比較

HTML

<!DOCTYPE html>
<html>
  <head>
    <title>hoge</title>
  </head>
  <body>
    <p class="big" style="font-size: 1.5em;">huga</p>
  </body>
</html>

Pug

doctype html
html
  head
    title hoge
  body
    p.big(style="font-size: 1.5em;") huga

比較考察

明らかにPugのほうが楽です。HTMLの綴じタグを書くときにインデントを追う必要もありません。
実はimportや変数、繰り返し機能があるので、Pug単体で使ってもかなり便利だと思います。

0
0
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
0
0