Open Bug 693164 Opened 14 years ago Updated 1 year ago

user style sheets should be able to style :visited links without the privacy restrictions imposed on author style sheets

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect

Tracking

()

REOPENED

People

(Reporter: gibbousmoon100, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Build ID: 20110928134238 Steps to reproduce: I'm filing this as a bug on the recommendation of Christopher Blizzard. Per the article and comments on this page: https://hacks.mozilla.org/2010/03/privacy-related-changes-coming-to-css-vistited/ , post-FF3 versions of Firefox have disabled the ability of many users to distinguish easily between visited and unvisited links. Expected results: Given the level of functionality that is lost by this security enhancement, the general consensus among users seems to be that the CSS limitations should have an opt-out option, preferably in an advanced settings page or in about:config.
The solution chosen to fix this problem is designed to separate the visual presentation that the user sees from what the website knows about. For an example of a page with no styling info see http://people.mozilla.com/~nhirata/html_tp/listlinks.html Some sites may choose to use the same color for their visited and unvisited links Firefox must respect the designers choices there.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
I don't understand this statement: "Some sites may choose to use the same color for their visited and unvisited links Firefox must respect the designers choices there." You could apply that exact logic to hundreds of undesirable things a designer could do if Firefox's design did not prevent it or allow a user to prevent it. Since we're on the topic of visibility, I'll cite font size as an example. A "designer's choice" could be to make the font very small and unreadable to someone with a vision impairment. Until recently, color-blind individuals were not disabled by Firefox's designers' choices. I recommend reading the comments attached to the link I posted for more concerns.
There should be an option to change it back. And at least make it so that visited links on the same domain are not affected by it.
Status: RESOLVED → REOPENED
Component: General → Style System (CSS)
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → style-system
Resolution: INVALID → ---
Summary: Recent changes to CSS have impeded FF functionality for many users. → user style sheets should be able to style :visited links without the privacy restrictions imposed on author style sheets
Version: 7 Branch → Trunk
I've only found out the change now, 'cause I've been using Fx 3.6 for very long time due to incompatibility of multitude of addons I've been using. Of course, caring about privacy is very important and it's good that finally the issue was implemented, but it is awfully bad for me to be able to change *only* color. I've been using Stylish userstyles to change background color of links on certain pages. Now I can't. In userContent.css, also no changes other than 'color' are possible (though it would be suboptimal to have one change for all pages -- I prefer Stylish attitude, to change per-site, 'cause it might be hard to find one color that will look good on all the webpages due to their layouts etc.). My proposals: 1) Add about:config entry for power users to be able to disable the privacy feature about :visited 1b) Make it per-domain configurable (more work though) 2) Change browser behavior so that userContent.css is more privileged to play with :visited 3) (Preferred) Make add-ons more privileged about :visited (I'm thinking about Stylish and Greasemonkey most).
(In reply to jamie g from comment #4) > My proposals: > 1) Add about:config entry for power users to be able to disable the privacy > feature about :visited > 1b) Make it per-domain configurable (more work though) > 2) Change browser behavior so that userContent.css is more privileged to > play with :visited > 3) (Preferred) Make add-ons more privileged about :visited (I'm thinking > about Stylish and Greasemonkey most). This bug is about user style sheets, which means it covers (2) and (3). (1) would be a different bug, but it's a good bit of work and I don't think it's worth doing if we can do this.
Also consider Bug 127962. Solving this Bug (693164) would be a more general solution and also a more useful one. As in Bug 127962, some users with sight disorders need to be able to distinguish visited and non-visited links other than by color, such as with a border, or alternate decoration (or even content). Some users with reading disorders previously applied :visited { display: none } because most links on the modern web are in block navigation sections and not inline with text. This reduces clutter as they move through websites, and they use the browser's own history interface to return to visited pages. Some users, due both to accessibility requirements or preferences, used css such as :link:after { content: attr(href); } :visited:after { content: none; } to show the destination of a link, but not visited links (to reduce layout clutter). Similar techniques are used for javascript: scheme links, or @target links, etc. This is no longer possible. The essential point being that I believe that this is a superior solution to Bug 127962, although that bug might be worth considering also. If User Style Sheets were allowed to circumvent the security measure provided by Bug 147777, a special preference is probably not required. Anyone advanced enough to be writing their own stylesheet is probably aware of, or does not care about, the privacy implications. Due to "herd immunity" rendering the privacy snooping technique almost useless, it's unlikely to be applied even against those vulnerable to it, as they would represent too small a user base to be worth attacking. Re: temhawk@gmail.com Comment #3 Allowing CSS to apply to visited links on the same domain would be an excellent solution, because there is relatively little privacy loss - except that, in practice, this opens up massive issues regarding security due to the nature of DNS. We already went through that with both Cookies and JavaScript (some of it is still ongoing). Even scheme changes (ftp vs http vs https) pose risks. I wonder if it would be worth it. Re: David Baron Comment #5 > (1) would be a different bug, but it's a good bit of work and I don't think it's worth doing if we can do this. It might be worth having as a debugging option. There are certainly options that are less-used than that one would be. Also, the logic might be useful to someone wanting to incorporate Gecko as a dedicated application where there are no privacy issues. But yes, that option would indeed be a separate bug.
i'd like an about:config entry that would allow to get full featured :visited and getComputedStyle back
Glad this was reopened. I respect the programmers choice to protect our privacy from advanced scripting attacks, but belive the knowledable user should be given a choice.
I also vote to allow add-on and userContent.css use more stylish capabilities. I read: https://bugzilla.mozilla.org/show_bug.cgi?id=147777 and found suggestion how to make: https://developer.mozilla.org/en/CSS/Privacy_and_the_:visited_selector working. There the code from chrome/userContent.css: :link, :visited { outline: 1px dotted !important } :link { outline-color: blue !important } :visited { outline-color: orange !important } which make visited links differ from non-visited by colors of outline...
Also I open: https://bugzilla.mozilla.org/show_bug.cgi?id=767173 :visited does not take "background-color" CSS in account (docs say opposite statement).
So have that we now? This page: https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and_the_:visited_selector lists 'color', 'background-color', 'border-color' (and its sub-properties), 'outline-color'. Only this properties can have effect for ':link' pseudo-class, but also they can't change opacity. By default 'a' / ':link' have border/background/outline color set to 'transparent'. That means that its alpha is 1.0. In order to show color you should change alpha to non 1.0 value (like 0.0). But that is restricted by Firefox to prevent user tracking. So you should permanently set non-transparent color: :link { outline-color: blue !important } so that will work: :visited { outline-color: orange !important }
I report bug https://bugzilla.mozilla.org/show_bug.cgi?id=1234188 that state that Firefox 44.0 and 45.0 doesn't respect any settings in userContent.css at all (just ignore).
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.