R
R
rrolegov2017-09-09 11:23:48
Yii
rrolegov, 2017-09-09 11:23:48

Yii2 Alert::widget registers css stylesheet in head, how to prevent it from doing so?

I want to use the Alert widget, as shown in the Yii2 advanced template example - this widget is called in the layout before $content. The problem is that when this widget is launched, it registers in the system a style sheet - bootstrap.css, which comes after all my styles and overrides the styles that have already worked. The result is chaos. How can I make Alert::widget not register my bootstrap, but use only the styles that I set for it. Now, even if I set my styles for him, he still registers this boostrap. How competently to forbid it to him?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2017-09-09
@rrolegov

Write your own widget based on Alert, there are a couple of lines of code. Specifically, you just remove it from the run method
. But without bootstrap, it makes no sense, it essentially connects js and builds a layout for bootstrap.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question