MediaWiki:Common.css

提供:MochiuWiki - SUSE, Electronic Circuit, PCB
2024年11月24日 (日) 04:18時点におけるWiki (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

注意: 保存後、変更を確認するにはブラウザーのキャッシュを消去する必要がある場合があります。

  • Firefox / Safari: Shift を押しながら 再読み込み をクリックするか、Ctrl-F5 または Ctrl-R を押してください (Mac では ⌘-R)
  • Google Chrome: Ctrl-Shift-R を押してください (Mac では ⌘-Shift-R)
  • Internet Explorer / Microsoft Edge: Ctrl を押しながら 最新の情報に更新 をクリックするか、Ctrl-F5 を押してください
  • Opera: Ctrl-F5を押してください
@media (prefers-color-scheme: dark) {
  /* コードブロック全体の背景と基本文字色 */
  .mw-highlight pre {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
  }

  /* Python特有の要素 */
  .mw-highlight .k  { color: #569cd6 !important; }  /* キーワード (def, print など) */
  .mw-highlight .nf { color: #4ec9b0 !important; }  /* 関数名 (dinner_menu) */
  .mw-highlight .s  { color: #ce9178 !important; }  /* 文字列 */
  .mw-highlight .c1 { color: #6a9955 !important; }  /* コメント */
  .mw-highlight .p  { color: #d4d4d4 !important; }  /* 括弧や句読点 */
  .mw-highlight .n  { color: #9cdcfe !important; }  /* 変数名 */
  .mw-highlight .o  { color: #d4d4d4 !important; }  /* 演算子 */

  /* C/C++の要素 */
  .mw-highlight .cp { color: #c678dd !important; }    /* プリプロセッサ (#include, #define など) */
  .mw-highlight .kt { color: #569cd6 !important; }    /* 型名 (int, void など) */
  .mw-highlight .nn { color: #61afef !important; }    /* 名前空間 */
  .mw-highlight .nc { color: #4ec9b0 !important; }    /* クラス名 */
  .mw-highlight .nl { color: #61afef !important; }    /* ライブラリ名 */
  .mw-highlight .c1 { color: #6a9955 !important; }    /* 単行コメント */
  .mw-highlight .cm { color: #6a9955 !important; }    /* 複数行コメント */
  .mw-highlight .na { color: #9cdcfe !important; }    /* 属性名 */

  /* テンプレート関連 */
  .mw-highlight .ops { color: #d4d4d4 !important; }   /* テンプレート演算子 */
  .mw-highlight .tel { color: #4ec9b0 !important; }   /* テンプレート要素 */

  /* 数値 */
  .mw-highlight .mi { color: #b5cea8 !important; }    /* 整数 */
  .mw-highlight .mf { color: #b5cea8 !important; }    /* 浮動小数点数 */

  /* 行番号がある場合 */
  .mw-highlight .linenos {
    background-color: #2d2d2d !important;
    color: #858585 !important;
    border-right: 1px solid #404040 !important;
  }
}