SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 34
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changes to :visited in Firefox/Gecko


  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Interesting but as they mention it won't affect the CSS much at all. Most of the cases they gave are quite...rare and won't happen much at all.

    Most :visited styles you apply are just those listed that they are supporting anyway.

    Useful article though . Thanks for the information.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I do know a share of sites that do use backgrounds and padding on visited links, so it does happen in the real world.

    I posted it because it's one of those small things that you need to keep in mind, not because it's likely to immediately affect most people. Who knows, maybe someone might want to add a background to a visited link someday. Better to know it's not possible rather than try and get thoroughly confused.

  4. #4
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Huh? I think you misunderstood (or me?) You CAN set backgrounds. So no..this doesn't affect us so far (via your argument)
    We’re limiting the CSS properties that can be used to style visited links to color, background-color, border-*-color, and outline-color and the color parts of the fill and stroke properties. For any other parts of the style for visited links, the style for unvisited links is used instead. In addition, for the list of properties you can change above, you won’t be able to set rgba() or hsla() colors or transparent on them
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Huh? I think you misunderstood (or me?) You CAN set backgrounds.
    According to the article you'll only be able to set background colours, not, e.g., background images. That could be a major drawback for some sites.

    I first thought this was a bad April's Fools joke, but it appears it isn't. I do think it's the wrong way to go about things. Paranoid people who are concerned about leaving traces on the 'Net could use a user style sheet with !important declarations to prevent tracking via the :visited pseudo-class. Imposing this sort of disadvantages on everyone seems far too drastic to me.
    Birnam wood is come to Dunsinane

  6. #6
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I agree with Tommy, but I like their concern about privacy also for unaware visitors.

    I don't fully understand the background transparent color-value omission as it is the default. (Hopefully it can be worked around by the shorthand.)
    Happy ADD/ADHD with Asperger's

  7. #7
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Mozilla has slowly been chipping away at whatever was "good" about their browser. I'm doing everything in my power to prevent getting an upgrade to 3.6.

    They removed "properties" from the right-click context menu. Uh, hello? Yes, let's break with every other browser in the universe and force people to download a plugin that doesn't work quite the same way.

    Their "png colour fix" that destroyed my personal web site (by making a "colour correction" on by default) is the top of retardation. Shame on them! Photographers who want colour correction on Flickr will do it themselves, that's why they bought fancy cameras and editing software in the first place. Don't ruin it for the rest of us.

    Their interesting "fix" for the focus caret bug (a decade-old mozilla bug) basically broke the orca screen reader, preventing people from being able to move their focus to new pages. The solution? downgrade to 3.5 or turn off the built-in correction-for-firefox-caret-bug. Great.

    The so-called "awesome bar" had quite a large amount of discussion regarding privacy in history. Everyone seemed pretty pissed that the pr0n they sought couldn't be hidden when they were using their computers for things like presentations. I don't know the details of that, but I do know that the auto-completion/suggestion in the address bar was so retarded (going by site name rather than url like it should) that I turned it off completely somehow (I forget).

    Now they continue with "protecting people from themselves". As Tommy said, people who actually give a rats' about :visited link privacy are willing to make their own stylesheet overriding this stuff anyway. Just like those of us who hate retarded Javascript for singing and dancing fading and bzing-bling-bling dropdown menus turn it off.

    What's scary to me is that all these things Mozilla does, webkit seems to follow. Arg.

    ARG!

    AAAAAARG!

    </rant>

  8. #8
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,296
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Tommy
    I first thought this was a bad April's Fools joke, but it appears it isn't.
    The first thing I did was check the date Then I waited for someone else to reply just in case

  9. #9
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Setting !important declarations will break the utility of visited links. Their solution maintains the usability of visited link designations, but fixes the problem. I wasn't really happy either, but their solution is the only practical solution. They presumably blocked other properties like padding because those can be used to detect a user's history by analyzing how the rest of the page reflows (or you can just consider the size of the element itself). For background images, you can detect server-side if the image was loaded and who loaded the image.

    Color correction is part of PNG. It is reasonable for them to support it. If you don't want color correction, then you shouldn't put that information in your images. Image formats support color correction because monitors differ. It is not possible to somehow apply color correction on your own as you had suggested, because it will not self correct on different environments.

    On the awesomebar, I have to admit that I vehemently abhorred it at first, but it grew on me. The problem with the old address bar is that it only matched the beginning of URLs, so while it worked in many cases, if your history contained many URLs that started in a similar fashion, then the address bar was useless. With the awesomebar, you can match other portions of the URL, so you get the best of both worlds.

  10. #10
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Color correction is part of PNG. It is reasonable for them to support it. If you don't want color correction, then you shouldn't put that information in your images. Image formats support color correction because monitors differ. It is not possible to somehow apply color correction on your own as you had suggested, because it will not self correct on different environments.
    I don't screw with my images. I simply change the filetype from whatever it was to png and WOW! Suddenly everything looks like complete garbage in one browser only: guess which one. They're just gradients and even solid colours for Pete's sake! They no longer match the CSS'd backgrounds! It's a whole new, invented colour! I should take screenshots, you'd barf if you saw my pages like this (dark red turned into an interesting shade of vomit brown). I don't dick with colour correction because I put in the hex number and expect to see that exact same colour on the web page. A reasonable request, I'd say.

    http://hacks.mozilla.org/2009/06/color-correction/ my complaint is in there too, not that it matters for anything other than letting off steam and begging Mozilla to tell our clients why their carefully designed sites suddenly look like a toddler got ahold of the code.
    *edit my comment seems to have vanished. It must not have been worthy.

    So, should I change all my pngs to work in Firefox on Macs/Linux and make all other OSes and browsers look like crap, or should I do it the other way around?? Sure, I can turn it off in my browser, but since I can't expect other people to do that, I leave it on to remind myself of how absolutely terrible everything looks to certain casual visitors. And my clients' pages too. And my boss' pages. IE, I'm used to it being silly. I expect it, but more importantly, I have easy hacks for it.

    All I want is a * html #element {styles for firefox;}

    and parent selecors

    and a p0ny.

  11. #11
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're not getting the point. Without color profile support, it is impossible to correctly reproduce colors in a picture across different environments. Any decent graphics editor and photo viewer understands color profiles, so it is reasonable that browsers should as well. Mozilla is not at fault. Rather, whatever program you are using is at fault, for not making it obvious enough that you are saving a PNG image with a color profile. You were never supposed to save images with a color profile (other than sRGB) if you are trying to seamlessly integrate it with CSS, which does not yet have support for color profiles.

    Safari has support for ICC profiles as well.

    If you want your images to look the same across the board, then remove the bogus data that you have in your images.

  12. #12
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q View Post
    Setting !important declarations will break the utility of visited links.
    I don't see how. Please elucidate. What's the difference between my setting a specific background/foreground colour combination in a user style sheet and Gecko forcing the author to do it?

    Quote Originally Posted by sk89q View Post
    Their solution maintains the usability of visited link designations, but fixes the problem. I wasn't really happy either, but their solution is the only practical solution.
    I don't call severe violations of the CSS specification a 'practical solution'. I call it a panic reaction. I call it cutting off your nose to spite your face.
    Birnam wood is come to Dunsinane

  13. #13
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    I don't see how. Please elucidate. What's the difference between my setting a specific background/foreground colour combination in a user style sheet and Gecko forcing the author to do it?
    The author can still detect a difference in style between visited and unvisited links. You would have to make both visited and unvisited links have the exact same style in your own user style sheet, which would break the visited link functionality.

    Quote Originally Posted by AutisticCuckoo View Post
    I don't call severe violations of the CSS specification a 'practical solution'. I call it a panic reaction. I call it cutting off your nose to spite your face.
    I wouldn't call it a panic reaction. The fact that they considered reflow and background images indicates that they put some real thought into this. This is unfortunately their only solution if they want to solve the problem. For example, there is nothing about margin and padding that you can do to allow their usage without still leaving holes. Even if they made getComputedStyle() outright lie, it is still possible to look at how the rest of page reflows.

    It's not a question of whether they considered the best solution or not. It's a question of whether you saw it as a problem or not. Personally, I don't find the disadvantages over-weighing the advantages, because the need for styling :visited links in a radical manner doesn't come up often.

  14. #14
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q;
    It's not a question of whether they considered the best solution or not. It's a question of whether you saw it as a problem or not. Personally, I don't find the disadvantages over-weighing the advantages, because the need for styling :visited links in a radical manner doesn't come up often.
    I see the problem, but...
    Quote Originally Posted by Erik J
    ... I don't fully understand the background transparent color-value omission as it is the default. (Hopefully it can be worked around by the shorthand.)
    ...I still don't see why transparency can't be allowed on visited links. (I suspect the "won't" could be a typo in the linked article.)

    Some info I found speaks about transparency...
    Like here: W3.org: SVG Content Interactivity
    For raster images, hit detection is either performed on a whole-image basis (i.e., the rectangular area for the image is one of the determinants for whether the image receives the event) or on a per-pixel basic (i.e., the alpha values for pixels under the pointer help determine whether the image receives the event):
    ...and how it can be used: Mozilla Developer Center/CSS/pointer-events
    The CSS property pointer-events allows authors to control whether or when an element may be the target of a mouse event. This property is used to specify under which circumstance (if any) a mouse event should go "through" an element and target whatever is "underneath" that element instead.
    From David Baron's Proposed Solution:
    ...
    ... If the relevant link is not visited, this function returns the color from the first (normal) style context. If the relevant link is visited, it returns a color whose R (red), G (green), and B (blue) components come from the second style context (the style-if-visited) but whose A (alpha) component comes from the first.
    Also note what he suggests about mouse events:
    If, in the future, we add (highly requested) values to this property that allow mouse events to reach elements depending on whether or not parts of an image or parts of the element are transparent, we need to be careful in two cases. First, SVG filters allow swapping of alpha and color components. Second, if we allow background images (above), those images might have transparency in different places.

    These problems could be avoided in one of two ways. We could ensure that pointer-events always looks at transparency based on unvisited styles. Or, alternatively, if we don't allow background images, we could ensure that pointer-events looks at transparency prior to processing of SVG filters (which might be easier anyway).
    Conclusion: For accessibility I still think also the transparency could be allowed on :visited for the visual appearance of an already loaded background to show (could also be allowed to change position).
    Happy ADD/ADHD with Asperger's

  15. #15
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q View Post
    The author can still detect a difference in style between visited and unvisited links. You would have to make both visited and unvisited links have the exact same style in your own user style sheet, which would break the visited link functionality.
    That is no different from limiting the properties that apply to :visited links. And if they make getComputedStyle() lie, then it doesn't matter either.

    Quote Originally Posted by sk89q View Post
    It's not a question of whether they considered the best solution or not. It's a question of whether you saw it as a problem or not. Personally, I don't find the disadvantages over-weighing the advantages, because the need for styling :visited links in a radical manner doesn't come up often.
    If they see this as a real problem (I don't, and it can be solved already for those who do) they should convey it to W3C and have the CSS specification changed. Not singlehandedly decide to violate the spec.
    Birnam wood is come to Dunsinane

  16. #16
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    They removed "properties" from the right-click context menu.
    Glad you mentioned it... thought I had a problem with my machine. Very frustrating I use this feature often to recap on image dimensions for CSS editing, I now need an extra couple of clicks
    The more you learn.... the more you learn there is more to learn.

  17. #17
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Here you go, Barry. It's not 100% the same, but if I accidently find myself unable to prevent an upgrade to 3.6, this is one of the first plugins I'll download... if I'm still using FF as my main dev browser by then.

  18. #18
    SitePoint Wizard
    Join Date
    Dec 2005
    Posts
    1,711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers Stomme poes just what I'm after

    Uh, hello? Yes, let's break with every other browser in the universe and force people to download a plugin that doesn't work quite the same way
    I second that
    The more you learn.... the more you learn there is more to learn.

  19. #19
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    That is no different from limiting the properties that apply to :visited links. And if they make getComputedStyle() lie, then it doesn't matter either.
    No, it's not the same. Say you only have access to two properties: color and padding.

    For your scheme to work, only this will work:
    Code css:
    a:link {
        color: blue !important;
        padding: 0 !important;
    }
    a:visited {
        color: blue !important;
        padding: 0 !important;
    }
    Besides breaking visited links, that has a high potential to really break many pages.

    None of these combinations can work:
    Code css:
    a:link {
        color: blue !important;
        padding: 0 !important;
    }
    a:visited {
        color: red !important;
        padding: 0 !important;
    }
    Code css:
    a:link {
    }
    a:visited {
        color: red !important;
        padding: 0 !important;
    }
    They all reveal holes.

    You cannot just change getComputedStyle() to lie either. That still leaves holes.

    This really is the only solution.

    Quote Originally Posted by AutisticCuckoo View Post
    If they see this as a real problem (I don't, and it can be solved already for those who do) they should convey it to W3C and have the CSS specification changed. Not singlehandedly decide to violate the spec.
    Perhaps if that was a quick process. I see no problem with violating the spec if there is a major problem with the spec. Also, besides the fact that no fix exists that doesn't severely degrade your experience (JavaScript has to be disabled and you have to override some CSS), it is not practical to expect most people to be aware of the problem or know how to fix it. If we applied that mentality in a broader scale, botnets, spammers, and DDoS attacks would be far more prevalent.

  20. #20
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q View Post
    I see no problem with violating the spec if there is a major problem with the spec.
    That's where you and I are on opposite sides of a very large field, so let's just agree to disagree, eh?
    Birnam wood is come to Dunsinane

  21. #21
    SitePoint Member
    Join Date
    Jan 2009
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the article.

    I do not use a:visited on my website, so this is probably good for me but I am shocked at the different scripts out there that would actually track over 2000+ pages of history. That is just amazingly crazy.

  22. #22
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An interesting use of the history exploit is http://www.haveyourfriendsbeenthere.com, which you can use to figure out which sites (out of a few dozen) your friends have visited.

    Warning: Quick way to destroy a friendship.

  23. #23
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    If they see this as a real problem (I don't, and it can be solved already for those who do) they should convey it to W3C and have the CSS specification changed. Not singlehandedly decide to violate the spec.
    +1

    This reminds me of the changes that were introduced to the way text measured in px's is treated in browsers these days on resizing. Browsers used to follow the specs. for that, but the last one to do so was IE6 I believe.

    If there is a problem with the specification, then change the specification, don't just ignore it.

  24. #24
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    O darn, it's depressing to see browser makers consciously interfering with the specs.

    when itís combined with getComputedStyle() in JavaScript it means that someone can walk through your history...
    I'm ignorant of JS, but couldn't they just set a rule that getComputedStyle() can't be combined with :visited?
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  25. #25
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,272
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    But ralph, it's for our own protection! Like when our government banned paddo's (magic mushrooms) because some foreign tourists came over, drank a lot of alcohol, did a bunch of crack and PCP and other Major Drugs, and then also some mushrooms, and then jumped out of windows and killed themselves... well, we can't have a government that lets people do that sort of stuff to themselves, so let's ban the drug that was least likely to cause the problem and tell people it's for their own good.

    Those who care will move to another country. I expect FF 3.6 will probably force me over to Opera as my main surfing browser, which is a shame because there's no NoScript for Opera. Maybe I should jump on them for that. But at least Opera correctly shows PNGs with a colour profile of sRGB (which according to the Gimp guys, that's Gimp's version of "no colour profile" because it's the only thing you can choose anyway, so I guess changing my profile is out unless I want to download some Gimp colour profile plugins... or I could just tell people using the inferiour browser that it's the cause of the page they see, and switching to ANY other browser (even the One Who Must Not Be Named) will miraculously fix the problem).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •