I've got the following Stash plugin module definition:
<web-item key="header" name="My Header" weight="40" section="header.global.secondary"> <styleClass>total</styleClass> <tooltip>Total</tooltip> <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> </web-item>
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?
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).
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)
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
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!
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