User tests: Successful: Unsuccessful:
Added a code that will reorder stylesheet links if you provide an option 'order' to the method addStyleSheet().
That will be useful if you would like to overwrite default template styles.
Include CSS file from your view and set option 'order'.
For example:
$this->document->addStyleSheet('../media/fixform.css', ['order' => 6]);
I am going to attach the file fixform.css, if you would like to use it for test.
fixform.css
fixform.zip
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
WebAsset is awesome feature!!! It's a wonderful solution for many of my issues. :)
Thank you very much!
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-02-16 18:21:12 |
Closed_By | ⇒ | Quy |
Closed_Date | 2019-02-16 18:21:12 | ⇒ | 2019-02-16 18:21:13 |
Closed_By | Quy | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/23912
Being blunt here, I feel like time is better invested on the web asset API instead of adding what I personally equate to a core supported hack to the API. If you really need this fine grained level of control of stylesheets you can already resort the
_styleSheets
property at theonBeforeCompileHead
event without adding another attribute to it. Specifying "I should render in slot 4" should not be the approach registering items, the logic should be "I should render after my dependencies", which is what the web asset API aims to accomplish. Even if someone decided this was a good idea to incorporate, how does it deal with the fact that there are umpteen thousand assets floating around the ecosystem and how does it prioritize 38 things having an order of 1 (which results in no real change)?