Создаем themes/mytheme В неё копируем из view папку layouts с содержащимся в ней main.php В config/web.php
'components' => [
'view' => [
'theme' => [
'pathMap' => ['@app/views' => '@app/themes/mytheme'],
],
],
],
Создаем themes/mytheme/css/style.css И в assets/AppAsset.php меняем содержимое класса на:
class AppAsset extends AssetBundle
{
public $sourcePath = '@app/themes/mytheme';
public $css = [
'css/style.css',
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap\BootstrapAsset',
];
}