1

I am using Yii framwork and whenever i open the page,it loads jquery-ui.css in assets.I want to change that css and apply my css.How can i change that css. Or from where this file comes.What is the path of jquery-ui.css in framework.

2 Answers 2

6

You can use the scriptMap feature of the clientScript component. It allows you to override any *.js or *.css file from the core (or other) packages. All you need is to configure it in your main.php.

'components' => array(
    'clientScript' => array(
        'scriptMap' => array(
            'jquery-ui.css' => '/css/my-own-jquery-ui.css',
        ),
    ),
),
Sign up to request clarification or add additional context in comments.

1 Comment

Really nice info there! If I could vote up twice, this would be the time. Kudos!
0

The file you are looking for can be found here:

framework/web/js/source/jui/css/base/jquery-ui.css

By the way, changing of core files is not recommended. It will be better to create your own css files and rewrite some rules there.

1 Comment

This can't be stressed enough: Do never change any framework file! You will curse yourself whenever you want to upgrade the framework to a new version. Instead copy the file to your own /css directory and modify it there. Then use one of the other described techniques to use it with your widget.

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.