0

I'm starting a new project with Yii2 based on the default example-Welcome-to-yii page. In this example-project, the css file from web/css/site.css is loaded.

But looking in index.php views/layout/main.php, views/site/index.php an the related controller/action, I can't find the place, where the site.css is registered. So how to remove the registration in order to remove that file?

1 Answer 1

1

The site.css registration is in yourapplication\asset\AppAsset.php

see this

    class AppAsset extends AssetBundle
    {
        public $basePath = '@webroot';
        public $baseUrl = '@web';
        public $css = [
            'css/site.css',
        ];
        public $js = [
        ];
        public $depends = [
            'yii\web\YiiAsset',
            'yii\bootstrap\BootstrapAsset',
        ];
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.