2
1

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.

Vuetify.jsのthemeに、名前にハイフンのつく色を指定する際に地味にハマった (light-blue、light-green、deep-purple、deep-orange、blue-grey)

2
Last updated at Posted at 2018-11-21

ドキュメント『こんな風にjsからthemeの色指定できるで!☺️』

https://vuetifyjs.com/en/style/colors
https://vuetifyjs.com/en/style/theme

スクリーンショット 2018-11-22 0.37.47.png スクリーンショット 2018-11-22 0.37.20.png

😳(なるほど……)
スクリーンショット 2018-11-22 0.46.14.png

😳(light-blueに指定したいな……)

スクリーンショット 2018-11-22 0.46.56.png スクリーンショット 2018-11-22 0.48.34.png

→ 動かない

特段ドキュメントに何も書いてなかったので、GitHubのソース見たら
https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/util/colors.ts

スクリーンショット 2018-11-22 1.00.46.png
  • light-blue
  • light-green
  • deep-purple
  • deep-orange
  • blue-grey

などのハイフンがつく色はそれぞれ、

  • lightBlue
  • lightGreen
  • deepPurple
  • deepOrange
  • blueGrey

みたいにキャメルケースで定義されていた。

スクリーンショット 2018-11-22 1.02.05.png

→ 動いた😀

2
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?