Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

What are the numbers next to links to style sheets in markup?

Started by amdival 9 years ago · 1 replies · 516 views
9 years ago

I'm curious about these numbers: 100, 99, 98, 97 . I haven't come across something like this yet, is it TWIG or is it HTML that I have not come across yet?

TWIG
{% block stylesheets %}
    {% do assets.addCss('http://yui.yahooapis.com/pure/0.6.0/pure-min.css', 100) %}
    {% do assets.addCss('https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', 99) %}
    {% do assets.addCss('theme://css/style.css', 98) %}
    {% do assets.addCss('theme://css/custom.css', 97) %}
{% endblock %}
{{ assets.css() }}
9 years ago

Hi, it's priority of loading. The higher, the first to be added to the HTML generated. Check this example.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 193 2 months ago
Themes & Styling · by Ian, 2 months ago
3 90 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 449 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 43 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 123 3 months ago