Answer the question
In order to leave comments, you need to log in
How to add id or class to styles in yii2?
How to add an identifier or a class to the styles in AppAsset.php in yii2 so that it is displayed in the browser like this:
<link id="theme_css" rel="stylesheet" href="assets/css/light.css">
<link id="skin_css" rel="stylesheet" href="assets/css/skins/default.css">
<link rel="stylesheet" href="assets/css/light.css">
<link rel="stylesheet" href="assets/css/skins/default.css">
public $css = [
'assets/css/light.css',
'assets/css/skins/default.css',
];
Answer the question
In order to leave comments, you need to log in
The question is closed, I tried to write like this:
public $css = [
['assets/css/light.css', 'id' => 'theme_css'],
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question