Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug 1307567] Remove inline styles from legacy pages #4406

Merged
merged 2 commits into from Oct 24, 2016

Conversation

alexgibson
Copy link
Member

@alexgibson alexgibson commented Oct 11, 2016

Description

  • Removes a bunch of inline styles from legacy pages.
  • The only thing that should be left after this PR in terms of inline styles are those contained in SVG files.
  • There are a couple of pages that we're loading web fonts from fonts.googleapis.com. As it stands I haven't found replacements for these fonts, just removed references to them (they're being blocked by CSP already). I'm open to suggestions for what we should do here, should we house the fonts on mozorg, find suitable system fallback fonts, or do nothing?

Update: It looks like both Crimson Text and Lora web font's both have SIL OFL licenses, so we can't redistribute them. I don't think we should add fonts.googleapis.com to the CSP whitelist.

– and is done in a way that totally respects your privacy.
<a href="{{ url }}" id="{{ id }}" style="{{ style }}">Give it a try!</a>
{% endtrans %}
{% if l10n_has_tag('remove-inline-styles') %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@flodolo - this is a very old page to which I imagine traffic is pretty low. How bad would it be to break a string here if we we're to remove the l10n tag?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only change is the removal of style="{{ style }}", right? I think I can script that, without using a new l10n tag.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, thanks @flodolo 👍

@alexgibson alexgibson force-pushed the remove-inline-styles branch 2 times, most recently from ff04c10 to e2413ed Compare October 11, 2016 10:44
@flodolo flodolo added the L10N label Oct 11, 2016
@alexgibson alexgibson force-pushed the remove-inline-styles branch 2 times, most recently from 960daf8 to 5231cc4 Compare October 11, 2016 14:15
@alexgibson alexgibson changed the title Remove inline styles from legacy pages [bug 1307567] Remove inline styles from legacy pages Oct 11, 2016
@@ -6,80 +6,12 @@
<html>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this page is used at all now? At one time it was shown in an iframe on the Hacks blog but they don't have it in the new design (and I'm not sure this newsletter is still alive at all). I think we can probably just delete this (including the related JS/CSS bits).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I had no idea this wasn't in use any longer, will remove it 👍

@@ -37,8 +37,8 @@ <h1 itemprop="name">Mozilla Firefox Privacy Policy</h1>
<ul class="spaced">
<li><em>Crash-Reporting Feature</em>. Firefox has a crash-reporting feature that sends a report to Mozilla when Firefox crashes. Mozilla uses the information in the crash reports to diagnose and correct the problems in Firefox that caused the crash. Though this feature starts automatically after Firefox crashes, it does not send information to Mozilla until you explicitly authorize it to do so. By default, this feature sends a variety of Non-Personal Information to Mozilla, including the stack trace (a detailed description of which parts of the Firefox code were active at the time of the crash) and the type of computer you are using. Additional information is collected by the crash reporting feature. Which crash reporting feature is used and additional information collected by Firefox depends on which version of Firefox you’re using.
<dl>
<dd><span style="text-decoration: underline;">Firefox 1.0 – 2.x</span>. For these earlier versions of Firefox, “Talkback” is Firefox’s crash reporting feature. Talkback also collects Personal Information (including your name, email address) and Potentially Personal Information (including your IP address, your computer’s name, and the processes you were running at the time of the crash). You can selectively disable the sending of this information. Additionally, you have the option to include the URL of the site you were visiting when Firefox crashed, a comment, and your email address in the report. Mozilla only makes Non-Personal Information and Potentially Personal Information in the public reports available online at <a href="http://www.talkback-public.mozilla.org/">www.talkback-public.mozilla.org/</a>.</dd>
<dd><span style="text-decoration: underline;">Firefox 3.0 to 3.x</span>. For the current versions of Firefox, the Firefox Crash Reporter is Firefox’s crash reporting feature. With this feature, you have the option to include the URL of the site you were visiting when Firefox crashed, a comment, and your email address in the report. Firefox Crash Reporter also sends Potentially Personal Information to Mozilla in the form of a unique numeric value to distinguish individual Firefox installs. Mozilla only makes Non-Personal Information and Potentially Personal Information in the public reports available online at <a href="http://crash-stats.mozilla.com/">http://crash-stats.mozilla.com/</a>.</dd>
<dd><span class="underline">Firefox 1.0 – 2.x</span>. For these earlier versions of Firefox, “Talkback” is Firefox’s crash reporting feature. Talkback also collects Personal Information (including your name, email address) and Potentially Personal Information (including your IP address, your computer’s name, and the processes you were running at the time of the crash). You can selectively disable the sending of this information. Additionally, you have the option to include the URL of the site you were visiting when Firefox crashed, a comment, and your email address in the report. Mozilla only makes Non-Personal Information and Potentially Personal Information in the public reports available online at <a href="http://www.talkback-public.mozilla.org/">www.talkback-public.mozilla.org/</a>.</dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch 😬 I wonder if the underline is really essential? If the point is just to set this off visually but it doesn't specifically have to be underlined, then <b> or <i> would suffice here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the <u> element is back in HTML5 (after being removed in XHTML) but now it's meant for annotations and mispellings, not for emphasis. So visually a <u> would have the same effect but it's probably not semantically correct.

@@ -715,7 +715,7 @@ <h3 id="nov-2003">November 2003 Update</h3>
<td valign="top">60</td>
<td valign="top">Networking<br>
</td>
<td style="vertical-align: top;">1.5 1.4.2</td>
<td valign="top">1.5 1.4.2</td>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alignment on these table cells is inconsistent throughout the page. I'd vote for removing the valigns everywhere rather than replacing these random inline styles. Maybe just set td { vertical-align: top; } for the whole table?


@import '../pebbles/includes/lib';

body {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was all just copied over but there's some silly/redundant styling here. Is it worth tidying it up or should we just leave it alone? I might even be inclined to remove the CSS entirely and just let browser defaults handle it.

Firefox can tell websites where you’re located so you can find info
that’s more relevant and more useful. It’s about making the Web smarter
&ndash; and is done in a way that totally respects your privacy.
<a href="{{ url }}" id="{{ id }}" style="{{ style }}">Give it a try!</a>
<a href="{{ url }}" id="{{ id }}">Give it a try!</a>
{% endtrans %}
</p>
</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed the demo popup at the bottom of this page has style="display:none", we can replace that with class="hidden"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@craigcook
Copy link
Member

Looks good, just a few minor nitpicks. It's tempting to overhaul some of that ancient code but perhaps that can of worms should remain closed for now. The only thing that really needs fixing is that last inline style on the geolocation page. r+wc 🍗

@alexgibson
Copy link
Member Author

@craigcook I started down the route of trying to fix up old CSS and improve the markup, but quickly came to realise it would be considerably more work than was highlighted in this diff. I think just concentrating on fixing the bug at hand is probably the best course of action for now. As these pages are very old I don't think it's worth spending much time trying to fix things, unless there is something obviously broken. We could always file some good first bugs for contributors to take on (kind of a wontfix, but patches welcome kind of thing).

@alexgibson
Copy link
Member Author

@craigcook updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants