Skip to content

Instantly share code, notes, and snippets.

@forrestgrant
Created August 23, 2013 14:18
Show Gist options
  • Save forrestgrant/6319810 to your computer and use it in GitHub Desktop.
Save forrestgrant/6319810 to your computer and use it in GitHub Desktop.
Using multiple stylesheets with pixate, for iOS specific styles.
// _ios_seven.scss
// iOS 7 specific styles
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
stylesheet = (Device.ios_version.to_f >= 7.0) ? 'ios_seven.css' : 'default.css'
PXEngine.styleSheetFromFilePath(File.join(NSBundle.mainBundle.resourcePath, stylesheet), withOrigin:0)
true
end
end
// default.scss
@import 'main'
// ios_seven.scss
@import 'main';
@import 'ios_seven';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment