「MediaWiki:Common.css」の版間の差分

提供:MochiuWiki - SUSE, Electronic Circuit, PCB
ナビゲーションに移動 検索に移動
編集の要約なし
編集の要約なし
7行目: 7行目:


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


   /* 行番号がある場合 */
   /* 行番号がある場合 */

2024年11月24日 (日) 04:18時点における版

@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;
  }
}