LoginSignup
36

More than 5 years have passed since last update.

CSSのスタイルを解除する

Posted at

CSSをマージした結果余計なものまで当たってしまっているときに、スタイルを解除するためリセット用のclassを作成

今回はテーブルのリセットを作成

xxx.scss
.reset_style {
  table {
    border-collapse: initial;
    border-spacing: initial;
    border-width: initial;
    border-color: initial;
  }
  tr {
    border-bottom: initial;
  }
  td {
    vertical-align: initial;
    padding: initial;
  }

}

initialを指定する事でスタイルの解除ができる。
後は、Chromのデベロッパーツールで確認しながら、リセットするStyleを探して追記していくだけ。

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
36