Closed Bug 954692 Opened 10 years ago Closed 10 years ago

"Paper Sheets": use media queries for conditional CSS instead of JS

Categories

(Instantbird Graveyard :: Other, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benediktp, Assigned: benediktp)

References

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1261 at 2012-02-10 08:29:00 UTC ***

The "Paper Sheets" messagestyle theme is using JS code to include different CSS files depending on the width of the browser. It's cleaner to solve this using media queries.

See: http://hg.instantbird.org/instantbird/file/8d377ceac36f/instantbird/themes/messages/papersheets/Footer.html#l43
Blocks: 953941
Attached patch Patch v1 (obsolete) — Splinter Review
*** Original post on bio 1261 as attmnt 1168 at 2012-02-10 09:23:00 UTC ***

This patch removes the JS code handling the window-width and -height and moves the CSS rules from medium.css/minimal.css/tight.css to main.css with appropriate media queries.
Attachment #8352914 - Flags: review?(florian)
Assignee: nobody → benediktp
Status: NEW → ASSIGNED
Comment on attachment 8352914 [details] [diff] [review]
Patch v1

*** Original change on bio 1261 attmnt 1168 at 2012-02-12 14:55:24 UTC ***

I haven't actually tried the patch, but this looks good and seems like a nice simplification, however you forgot to remove the 3 deleted CSS files from jar.mn, so that patch as is would break the build.
Attachment #8352914 - Flags: review?(florian) → review-
*** Original post on bio 1261 at 2012-02-12 15:14:41 UTC ***

I'm sorry, I didn't even think about that. I'll try to do better next time.
*** Original post on bio 1261 at 2012-02-13 13:20:24 UTC ***

I did wonder though if I had to do something special to remove the "CSS" directory which contained the files from the repository.
Attached patch Patch v2Splinter Review
*** Original post on bio 1261 as attmnt 1198 at 2012-02-25 15:36:00 UTC ***

This patch includes the necessary changes to jar.mn. I haven't tested it again.
Attachment #8352949 - Flags: review?(florian)
Comment on attachment 8352914 [details] [diff] [review]
Patch v1

*** Original change on bio 1261 attmnt 1168 at 2012-02-25 15:36:30 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352914 - Attachment is obsolete: true
Comment on attachment 8352949 [details] [diff] [review]
Patch v2

*** Original change on bio 1261 attmnt 1198 at 2012-04-25 12:05:31 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352949 - Flags: review?(florian) → review?(clokep)
Comment on attachment 8352949 [details] [diff] [review]
Patch v2

*** Original change on bio 1261 attmnt 1198 at 2012-04-26 00:45:05 UTC ***

This looks good, the packaging changes work fine. :)
Attachment #8352949 - Flags: review?(clokep) → review+
Whiteboard: [checkin-needed]
*** Original post on bio 1261 at 2012-04-29 23:09:13 UTC ***

Checked in as http://hg.instantbird.org/instantbird/rev/3c71fb425d43

Thanks for simplifying this code!
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.