Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

CSS: Specify order of CSS files when using custom themes #6291

Closed
frequent opened this issue Aug 6, 2013 · 1 comment
Closed

CSS: Specify order of CSS files when using custom themes #6291

frequent opened this issue Aug 6, 2013 · 1 comment

Comments

@frequent
Copy link
Contributor

frequent commented Aug 6, 2013

Pre JQM 1.4 I used to first add my structure.css file followed by my themes.css, which seemed to work without problems.

In the current build, the CSS "order" in http://code.jquery.com/mobile/git/jquery.mobile-git.css is:

  • icons
  • theme a&b
  • structure

So when I know want to swap my custom theme, I can now put it before structure, after structure or in the middle.

Naturally I started with adding it after the JQM.css which caused some problems, because some rules are

  1. set in theme
  2. overwritten in structure
  3. now are reset "falsely" in custom theme.

Namely:
.ui-panel > gets borders (and subsequent scrollbars) from ui-overlay-x
.ui-header > gets full borders from ui-bar-x

If it's not an issue, the instructions for creating custom themes should clearly specify where the themes file should go in the CSS-order. Let me know if you need a demo page.

@jaspermdegroot
Copy link
Contributor

@frequent

Theme should always come before structure. When you download a custom theme in the Theme Roller this is mentioned. Do you mind opening a ticket in the API docs repo that we should add this information there? Thanks!

Icon CSS can be anywhere. Still looking into how we should exactly include this. See #6167.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
2 participants