Skip to content

Support more attributes in addJs() and addCss(), and separate getCssJsHtml() #3009

Open
@loekvangool

Description

@loekvangool

Description (*)

Modern HTML5 CSS and JS assets come with attributes like crossorigin and perhaps from CDNs.

  • addJs() and getCssJsHtml():

It's vital that CSS is above JS in the <head>, but if you're really going for it, more control is needed: https://speakerdeck.com/csswizardry/get-your-head-straight?slide=39. But as a start, getCssJsHtml() could accept an argument to either ouput CSS or JS, or new methods could be added that do the same thing (getJsHtml(), getCssHtml()). That way, the designer can put custom code between CSS and JS in head.phtml.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions