Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using frank helpers in .sass files? #83

Open
null1099 opened this issue Aug 23, 2013 · 2 comments
Open

Using frank helpers in .sass files? #83

null1099 opened this issue Aug 23, 2013 · 2 comments

Comments

@null1099
Copy link

Hi, I would like to know if there's a possibility to use frank helpers from helpers.rb within .sass files. I've tried

-if is_ipad?
 sass goes here...

like I do successfully in .haml files, but it doesn't work. Error: "Invalid CSS after "-if is_ipad": expected selector, was "?" (Sass::SyntaxError)"

@trvsdnn
Copy link
Owner

trvsdnn commented Aug 23, 2013

Unfortunately it's not possible. Helpers are only available in templates that support ruby code evaluation. It could be possible if frank went the route of chaining extensions and evaluating one after the other, but that would be a big rewrite.

Just curious, but why would you want the sass to be there or not based on if it's ipad or not? Wouldn't you want the css to be there always and just not be used on requests from ipads?

@null1099
Copy link
Author

Hi and thx for the quick reply. I'm using frank export with an ENV[mytarget]=platform, so I could handle some content (inside .haml) platformspecifically. For some image, the iPad doesn't render max-width: 100%; correctly so I would use a static value therefore. Would be great to apply the same logic as in the haml templates ;-)
Again, thanks a lot for the reply and frank!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants