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

RESOLVED FIXED in 1.2

Status

Instantbird
Other
--
enhancement
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Mic, Assigned: Mic)

Tracking

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
*** 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
(Assignee)

Updated

4 years ago
Blocks: 953941
(Assignee)

Comment 1

4 years ago
Created attachment 8352914 [details] [diff] [review]
Patch v1

*** 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)

Updated

4 years ago
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-
(Assignee)

Comment 3

4 years ago
*** 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.
(Assignee)

Comment 4

4 years ago
*** 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.
(Assignee)

Comment 5

4 years ago
Created attachment 8352949 [details] [diff] [review]
Patch v2

*** 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)
(Assignee)

Comment 6

4 years ago
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
Last Resolved: 4 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.