Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The module produce wrong weights of CSS files.
- The error exist only if the module enabled.
- If the module not enabled, the correct CSS file weights are used from the JQM theme with their defined weights. BUT, not the two weights of the Next thing below.
The result:
The theme CSS file is not the last CSS file!
Thus it is not possible to overwrite formattings in
- "jquery.mobile-1.0.1.css"
- "jquery.mobile.structure-1.0.1.css"
with the theme CSS file or subtheme CSS file.
Next thing
The next thing is the wrong weight of the JQM files 1. and 2..
I think, the jquery.mobile.structure CSS file extend the jquery.mobile CSS file.
To follow this, the jquery.mobile.structure CSS file MUST be linked AFTER the jquery.mobile CSS file!
Solution
Proper weights of CSS files:
- jquery.mobile CSS file
- jquery.mobile.structure CSS file
- jQuery Mobile theme CSS file
This is very important to fix this bug to allow the good use of JQM subthemes.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screen Shot 2012-04-30 at 5.24.22 PM.png | 50.52 KB | jasonsavino |
#5 | Screen Shot 2012-04-30 at 5.24.12 PM.png | 50.92 KB | jasonsavino |
Comments
Comment #1
adamjanzen CreditAttribution: adamjanzen commentedUsing the jquery mobile themeroller, it also suggests putting the structure CSS after the theme file:
Probably need to look further into why this is done by default.
Comment #2
jasonsavino CreditAttribution: jasonsavino commentedI believe that in both the module and the theme there should be an option to use the default jquerymobile css files or the structure plus custom css files. There is no need to use the structure css file when using the default css. so the end result would be:
DEFAULT:
CUSTOM:
Comment #3
minorOffense CreditAttribution: minorOffense commentedThis means we'll probably have to register the weight of the default structure css file to allow other modules/themes to position themselves above it.
Comment #4
quiptime CreditAttribution: quiptime commented@Jason,
the CSS file weights in #2 are wrong!
Thats is correct:
The ultimate authority must always be the CSS file of the theme.
This is a golden rule of Drupals theming.
Comment #5
jasonsavino CreditAttribution: jasonsavino commentedThe structure file is not to be used with the default swatches. It is to be used in such cases as a theme created with themeroller. I agree that the placement of the Drupal theme css file was incorrect but that was by design. Placing it there allowed the swatches to be overridden at the correct time.
After careful thought, I decided to split the styles into 2 files in the mobile_jquery theme and will move similar functionality to the module shortly.
Also, new theme settings have been introduced and can be seen in the attached images.
If the structure file is disabled the following code is added:
If the structure file is enabled the following code is added:
Comment #6
minorOffense CreditAttribution: minorOffense commentedHave these changes been applied? If so, we can do some testing so we can close the issue.
Comment #7
cimo75 CreditAttribution: cimo75 commented+1 also for me the library css file is loaded last so I can t load any swatch
Comment #8
kscheirerLooks like this is still a problem. I'm not sure what needs to be changed, can someone get me started on a patch?