CSS resource not being included in Stash web-item plugin module

I've got the following Stash plugin module definition:

<web-item key="header" name="My Header" weight="40" section="header.global.secondary">



<resource type="download" name="total.css" location="css/total.css"/>

<condition class="com.atlassian.stash.web.conditions.IsLoggedInCondition"/>

<context-provider class="plugin.contextproviders.TotalContextProvider"/>

<label>$total dollars</label>


However, when I start up Stash (atlas-run) the styling I've included in total.css (making the background-color red) isn't being applied. I can't see the total.css file included anywhere when I use Chrome Dev Tools to try and find it, and the style applies fine if I manually edit the css in Chrome Dev Tools.

Any idea why the style isn't being applied and why I can't see the CSS being downloaded/included anywhere?

1 answer

1 accepted

0 votes
Answer accepted

Hi Annie,

I'm afraid to say that it appears that web-items don't support download resources. You'll have to add the resource another way. You could do that with with an extra web-resource (or stash-resource) with a context (like global or atl.general).



Awesome, I added a web-resource with atl.general context and it works as I want it to :) Thanks!

Seb Ruiz Atlassian Team Apr 04, 2013

Hi Annie,

Using atl.general is not recommended, as it adds your resources to every page in Stash. Unless you actually need to target every page, please take a look at https://developer.atlassian.com/stash/docs/latest/reference/web-resource-contexts.html for a more appropriate context (nb: atl.general does not hit admin pages)

Hey Seb, thanks for the advice. I do actually need it to display on every page - so I guess I should apply it to the atl.general *and* atl.admin.

Hi Annie,

Adding both contexts to your resource is correct then.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Thursday in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

....sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables ROLLBAR_ACCESS_TOKEN...

186 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you