0
0

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 1 year has passed since last update.

Moodle カスタムCSSを追加する

Posted at

Moodleで自分のCSSを追加する方法を明記します。

MoodleのCSS

moodleはCSSをSCSSで書く必要がある。

保存場所

scssの保存場所は以下(ファイル名は任意でOK)

theme/テーマ名/scss/main.scss

config.phpを書き換える

ただアップすれば反映してくれるわけじゃない。
config.phpを書き換えてあげる必要がある。

theme/テーマ名/config.php
config.php
//テーマがbootsの場合、以下をコメントアウト
//$THEME->scss = function($theme) {
//  return theme_boost_get_main_scss_content($theme);
//};*

//以下を追加(main.scssの場合 拡張子は書かない)
$THEME->scss = 'main';

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?