Config For Boostrap Css Only In Gii

My config/web.php




<?php


$params = require(__DIR__ . '/params.php');

$db = require(__DIR__ . '/db.php');


$config = [

    'basePath' => dirname(__DIR__),

    'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),

    'components' => [

        'assetManager' => [

            'bundles' => [

                'yii\bootstrap\BootstrapAsset' => [

                    'css' => [],

                ],

            ]

        ],

    ],

];


if (YII_ENV_DEV) {

    // configuration adjustments for 'dev' environment

    $config['preload'][] = 'debug';

    $config['modules']['debug'] = 'yii\debug\Module';

    $config['modules']['gii'] = [

        'class' => 'yii\gii\Module',

        'components' => [

            'assetManager' => [

                'bundles' => [

                    'yii\bootstrap\BootstrapAsset' => [

                        'css' => [

                            'css/boostrap.css'

                        ],

                    ],

                ]

            ],

        ],

    ];

}



I removed the boostrap.css from application layout and I registered an custom css for my template.

But gii needs boostrap.css and the asssetManager in module component don’t replace parent assetManager. How to do it?

Resolved removing boostrap for my custom template, assuming Yii Boostrap css.

Is that still working for you? I’m not sure if Yii2 has changed since then. Currently I’m trying to modify either BootstrapAsset or YiiAsset or anything that will effect the css that’s included with Gii. But regardless of how I set it in config/web.php, it doesn’t seem to have any effect on Gii, even though it does in my other controllers.