GithubHelp home page GithubHelp logo

Comments (4)

mmocny avatar mmocny commented on May 27, 2024

Hello François! Preparing to write up a G+ post? ;) We look forward to it.

CCA provides a default stylesheet to try and emulate the desktop chrome app styles:
https://github.com/MobileChromeApps/chrome-cordova/blob/master/plugins/chrome-bootstrap/www/chromeappstyles.css

It is based on: https://code.google.com/p/chromium/codesearch#chromium/src/chrome/renderer/resources/extensions/platform_app.css

Ours has fallen out of date, so I will update it to the latest version. Still, it appears that the platform_app.css will not supply a default body height of 100%. I'll investigate to see where that style is actually coming from on the desktop platform.

Note: we do not attempt to override the default user agent styles to make the webview more like chrome. There is another issue (#8) already open to provide a default css reset, so clearly this is something users want.

from mobile-chrome-apps.

beaufortfrancois avatar beaufortfrancois commented on May 27, 2024

Hey Michal,

Yes, I was about and wanted to convert a simple Chrome App to Android but stumbled upon #62 sadly ;) I guess I'll have to wait a little bit more for this one.

Regarding this issue, it's not just about the <body> but also the <html>:

html,  body {
  height: 100%;
}

I actually thought user agent styles would be the same for desktop and mobile chrome apps. Doesn't it make sense?
Having the same rendering logic in Chrome wherever it runs on mobile or desktop?

from mobile-chrome-apps.

agrieve avatar agrieve commented on May 27, 2024

Yeah, I think it makes sense to add what user-agent CSS differences that we can. This certainly seems like a big one.

from mobile-chrome-apps.

mmocny avatar mmocny commented on May 27, 2024

@beaufortfrancois has just discovered that the root cause was a missing <!DOCTYPE html> from his application, which was causing the height 100% in desktop chrome. This is either a bug with apps on desktop, or at least a quirk we don't need to emulate.

Most app developers must add the style themselves. Closing this as wontfix.

from mobile-chrome-apps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.