Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
custom.css at last position?
If I add:
it gets added at the end of all the CSS.
What should be the correct code so that the custom.css will be the last one?
To be true: I do not really understand the sorting of the css files in the head. But to my understanding it should be:
styles.cssfor this is the Vanilla standard
custom.cssbecause it is the master of a custom theme
3. And then all other plugins css files
Forcing another sort order doesn't make sense to me. But you can try the following code:
But again: doing so feels wrong to me.
you said If I add:$Sender->AddCssFile('file.css'); it gets added at the end of all the CSS.
if the above option does not work for you.
then why not add it with a sort option that is lower than the custom.css which seems to be 10
you would need to fiddle with second parameter.
addCssFile('file.css', false, ['Sort' => 5]);
$Sender->addCssFile('file.css', 'plugins/silly', ['Sort' => 5]) );
depending on your php version you might need the array keyword.
but again, using specificity might be better then segmenting up css files. this too can be debated.
This is correct.
Aslo make sure you use the the right to add it.
grep is your friend.
You're probably using the wrong hook. Use