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

Add custom CSS for Cordova build only #118

Open
abarax opened this issue Mar 12, 2015 · 1 comment
Open

Add custom CSS for Cordova build only #118

abarax opened this issue Mar 12, 2015 · 1 comment

Comments

@abarax
Copy link

abarax commented Mar 12, 2015

This may actually be a feature request and not a bug..

What I am trying to do is add some custom css rules that are only applied when building for cordova as opposed to building for the web.

Does the current plugin support this at all? Is this something that the plugin can add support for? Or should this functionality be achieved elsewhere?

Presumably this should work using the "content-for head" with an "cordova.css" defined somewhere.

I am happy to build this, just need thoughts on if you want it included and/or architectural decisions.

I have it working on my local env with just the following change to the index.js coupled with adding the following file "cordova/merges/ios/cordova.css" (This file should probably reside in app/styles and get copied across).

contentFor: function (type) {
  if (this._isTargetCordova() && type === 'head') {
    return '<link rel="stylesheet" href="assets/cordova.css">';
  }
  if (this._isTargetCordova() && type === 'body') {
    return '<script src="cordova.js"></script>';
  }
}
@DanielOchoa
Copy link
Contributor

Right now there is no support for this. The way we are handling this requirement right now is by using ember-cli-compass-compiler so we can include Singularity.gs for the responsive grids with media queries.

This is definitely something that could be useful though, given that including compass adds to the build time of the project plus it has a lot of extras that you may not need.

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

No branches or pull requests

2 participants