6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

.alert.alert-errorがスタイルされない

Posted at

環境

  • ruby 2.1.2
  • rails 4.1.1
  • bootstrap-sass (3.1.1.1)

きっかけ

.alert.alert-errorをクラスに指定したけど、意図した表現が実現できなかった。
あれ?って思ったけど、原因は単純でbootstrapにそもそも定義がないため。本家サイト
.alert-dangerの表現を意図していたので、CSSを下記の解決策ように記述すれば.alert-errorも.alert-dangerと同じ表現になる。

解決策

@import "bootstrap"

/* snip */

.alert-error
  @extend .alert-danger

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?