-
12 Nov 2012 10:29 AM #1
Unanswered: Mastering SASS/CSS, how to set backgrond image?
Unanswered: Mastering SASS/CSS, how to set backgrond image?
Hi, I'm trying to add custom css to my project.
app.json:
resources/sass/styles.saasCode:"css": [{ "path": "resources/css/app.css", "update": "delta" }, { "path": "resources/css/styles.css", "update": "delta" } ],
sencha app build package:Code:.c-post-marker { position: relative; background-image: image-url('resources/images/post_marker.png'); height: 61px; width: 50px; }
So, for some reason path is realy wrong because it doubled.Code:[shellscript] WARNING: '''post_marker.png''' was not found (or cannot be read) in /Users/josser/Projects/project_name/resources/sass/Users/josser/Projects/project_name/resources/sass/../images/resources/images
I tried to set absolute path:
but no luck, image just didn't load. I checked what it tries to load in weinre and found this:Code:background-image: image-url('/resources/images/post_marker.png');
So, what is correct way to set path for images?Code:file:///resources/images/post_marker.png
Thanks!
-
14 Nov 2012 6:14 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,640
- Vote Rating
- 434
- Answers
- 3106
a proper SASS file doesn't have extension .sass and the build process for Sencha Command shouldn't be compiling your SASS (the new Cmd does) so are you including post_marker.png somewhere else in app.json?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
14 Nov 2012 6:45 AM #3
Oh, I'm very sorry, the correct filename is styles.scss instead of styles.saas


Reply With Quote