Skip to content Skip to sidebar Skip to footer

What Should File Paths Fed To Insertcss() Be Relative To?

I'm starting out with phonegap and have found the docs to be a bit vauge on this point. When I use insertCSS() on my current project it seems like whatever path I use, the css is n

Solution 1:

Internal type styling in CSS generally have a higher order of precedence over external styling.

Therefore This (from your GitHub Code):

iab.insertCSS( { code: "body { background-color: green; }" }, function(){
  iab.insertCSS( { code: "body { background-color: green; }" } );

would always be executed instead of this:

iab.insertCSS( { file: "../css/chat.window.css" }

since they are both styling the same element. The complete order of precedence from top priority to least is:

  1. Inline Style (top priority)
  2. Internal Style
  3. External Style (least priority)

Post a Comment for "What Should File Paths Fed To Insertcss() Be Relative To?"