Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
The Internet

W3C Member Proposes "Fix" For CSS Prefix Problem 144

Pieroxy writes "The W3C is proposing a set of new rules for CSS prefixing by browser vendors. This would greatly mitigate the problem caused today where vendor specific prefixing is seeing its way through production sites. The problem is so bad that some vendors are now tempted to support other browsers' prefixing. The article also has a link to an email from Mozilla's Henri Sivonen that does a nice job of addressing many potential issues and shortcomings of this new proposal." I was under the impression that browser prefixes existed to allow use of experimental CSS features before standardization; just ditching the vendor prefix seems like a step backward.
This discussion has been archived. No new comments can be posted.

W3C Member Proposes "Fix" For CSS Prefix Problem

Comments Filter:
  • The solution is.. (Score:4, Insightful)

    by Psylok ( 1526433 ) on Wednesday May 09, 2012 @08:42AM (#39940677)

    Drop them all.

    I always wondered why they've put them there in the first place. I mean: since you are implementing the function, why call it with a different name?

    • by Anonymous Coward on Wednesday May 09, 2012 @08:44AM (#39940693)

      Yes, they should just use the standard.

      Stupid microsoft.

      • Re:The solution is.. (Score:5, Informative)

        by WrongSizeGlass ( 838941 ) on Wednesday May 09, 2012 @08:48AM (#39940759)

        Yes, they should just use the standard.

        Stupid microsoft.

        Many of the browser vendors are to blame. I'd love to point the finger at Microsoft, but they aren't the only one who isn't compliant with the supposed standards (CSS, DOM, Javascript, etc).

        • by gl4ss ( 559668 )

          Yes, they should just use the standard.

          Stupid microsoft.

          Many of the browser vendors are to blame. I'd love to point the finger at Microsoft, but they aren't the only one who isn't compliant with the supposed standards (CSS, DOM, Javascript, etc).

          I think it was a sarcastic jest at the parent post, which suggested that a browser producer should name a css property superblubbery instead of ms-superblubbery, which is what ms did and got flak for?

          who really gives a fuck about w3c anyways? it's not like they're ever on the leading edge. devices api group? oh they're only 5 years late and based on vendor specific stuff that shipped 5 years ago, how very nice.

          • What about the webkit and moz prefixes? It's not just MS this time I'm afraid. I curse Adobe for this madness!
        • Re:The solution is.. (Score:5, Informative)

          by mwvdlee ( 775178 ) on Wednesday May 09, 2012 @09:19AM (#39941037) Homepage

          I used to think that too, but then I started to do web development.
          Usually I develop a site on Chrome.
          Then verify that everything works on Safari, FireFox, Opera and iOS/Android if applicable.
          Then replace CSS styling with images to make it work on IE9.
          Then reduce layout to make it work on IE8.
          Then replace the div layout with nested tables to make it work on IE6.
          Then thank the gods I don't have to support IE5.5 any more.

          Yes, all browsers have compliancy issues. IE is just far, far worse than all the others.
          Even IE9 is more troublesome than a version of FireFox from a few years ago.
          IE10 improves a lot, but is still worse than the other major browsers.

          • Re: (Score:3, Interesting)

            by Anonymous Coward

            What we need is a more "amateur" web, where people only do the work in your first step, maybe also do the second step (test on one or more other (non-IE) browsers) which only takes a minute or two, and then say they're done -- simply blowing off the question of whether or not the site looks perfect on IE.

            You can't do that (neither can I) at our jobs but for a situation where there isn't some boss telling you "21% of our users are still using IE so the site has to look ok," then blowing off IE is simply no

            • by jc42 ( 318812 ) on Wednesday May 09, 2012 @05:05PM (#39947853) Homepage Journal

              we need is a more "amateur" web, where people only do the work in your first step, maybe also do the second step (test on one or more other (non-IE) browsers) which only takes a minute or two, and then say they're done -- simply blowing off the question of whether or not the site looks perfect on IE.

              What we really need is to learn to strongly resist the idea that a page need look perfect on any browser. This is a "drop-dead" requirement that can't be achieved. Even if you think you've done it for one browser, the next upgrade (which is probably being installed by some of your clients right now) will shoot down your perfection. And the developers of commercial browsers (e.g. IE) have taken great pains to ensure that you can't succeed. They want walled gardens, and they're building them. The concept of "perfection" in web pages is one of their tools. The only way to win this game is not to play it.

              Since the start of the Web, the main function of HTML has been to make documents that are usable as widely as possible, despite the huge differences in displays, window systems, input devices, etc. The right way to test pages is to verify the usability of a page on a wide range of devices, now including handhelds. Web designers that design a "perfect" page and insist that it look the same everywhere are missing the main point of it all. The vendors are guaranteeing that you can't do this, no matter what your design.

              If your page insists on a "perfect" display of the page, it will simply fail on display and/or window systems that don't permit your page's requirements. So aim for "functional" instead, with design aesthetics a distant second, and you'll produce much more usable pages.

              This may require educating your boss(es) about the nature of your "market". But they should be used to this. After all, consider the canonical auto analogy: What would you think of a boss who thought that a single model car can be built that will satisfy all customers? That's just dumb, right?

              • I used to be excited about the web, until I realised it was a document display network that's being shoehorned into an application delivery platform using a woefully ill equipped scripting language -- Protip: It's called JavaScript because you're supposed to do little with it, and leave the heavy lifting to Java. Google Drive is out! To use it in a web app (JavaScript) I'm supposed to use to Base64 encode the data and manually construct a multi-part POST request and send it through an iframe proxy -- WHAT

                • Oops, forgot to escape the tags, what a joy --- that's supposed to be a JS game in IE6 dom (on a Pentium III) beating out the port of the same game in HTML5 + <canvas> & <audio> (on a 2.3Ghz dual core P4). So, it's like watching that car from "The Beverly Hill Billies" winning a Formula One race because "the state of the art" cars have to many crazy carbon-fiber wings attached.

          • by Piata ( 927858 )

            I really hope you're exaggerating about using nested tables to make a site work in IE6. A custom stylesheet that only targets IE6 can do the job just as well. The only hard part is knowing all of IE6's quarks.

            Personally, I prefer to go the slightly more controversial route and not support anything below IE8. If a client wants IE6 support, they're going to pay through the nose for it.

            • by rs79 ( 71822 )

              I have a more radical solution. If I detect IE I use an undocumented instruction and make sparks fly out the back of the computer.

              Payback for all that "this site only works in IE" rubbish.

            • Personally, for my own sites, I go for "It's standards compliant and works in Safari/Firefox/Chrome, it's done".

              For work we tend to target recent Chrome/FF/Safari and IE7+. This generally works well as most users have upgraded to at least IE7 at this point.

            • by mwvdlee ( 775178 )

              Obviously a single sentence cannot possibly describe all the failures in standards compliance that ruin IE6 but some of the more interresting things you can do with more recent non-IE browsers simply fail in IE6. Sad as it is, but tables are still the most reliable method for layout and some things are a lot easier to do with tables than with divs (although using display:table/table-row/table-cell helps somewhat).

          • i was with you until IE6. it's your duty as a developer to royally bitchslap the living fuck out of anyone still using that browser. no mercy, no excuses. IE6 is unsupported and dead. dead dead. 0xDEADDEAD, microsoft says STOP, error. 0xDEADBEEF dead. your memory of IE6 has been freed up and you may no longer reference it. fuggetaboutit. if you're being paid enough money to convince yourself otherwise, a simple IE targeted stylesheet (included via conditional comments) is enough to pixel push it back into s
      • Re: (Score:2, Troll)

        I think they're talking about stuff like this... not really a microsoft problem. #example1 { -moz-box-shadow: 10px 10px 5px #888; -webkit-box-shadow: 10px 10px 5px #888; box-shadow: 10px 10px 5px #888; }
    • by Sarten-X ( 1102295 ) on Wednesday May 09, 2012 @08:47AM (#39940739) Homepage

      Because IE's implementation of a given function might be different from WebKit's, so a designer has to resort to more painful workarounds to get a perfect design. It's easier to just duplicate the same detail with different prefixes (and slightly different parameters, as needed), and know that the directive will be ignored by browsers that don't do exactly what the designer wanted.

      It's like back in the bad old days of web design, where websites ran JavaScript to detect what browser was in use, so the page elements could be repositioned on the fly as needed, and the right objects would be used in other scripts.

      • by QuasiSteve ( 2042606 ) on Wednesday May 09, 2012 @09:12AM (#39940983)

        It's like back in the bad old days of web design, where websites ran JavaScript to detect what browser was in use

        Those bad old days are ongoing. Just because everybody and their dog are including jquery now doesn't mean the sites aren't still using browser-specific javascript, css, markup, etc.

        It's easier to just duplicate the same detail with different prefixes (and slightly different parameters, as needed), and know that the directive will be ignored by browsers that don't do exactly what the designer wanted.

        Which, unfortunately, got broken with the popularity of WebKit (whether one blames Apple or Google, doesn't really matter), because designers just started using the webkit prefixed CSS and ignored the rest because it still looked 'okay enough' in other browsers, so why bother making those look 'great'?
        The same applies to things outside of the CSS realm, like the apple-touch-icon link. Android uses it. Yep - want pretty bookmarks on Android? Specify the Apple (by name) icons.
        Largely this is because the standards people are moving way, way too slow.

        But then there's the flipside of the coin. The Opera article in which they announced - along with Mozilla - to support some webkit prefixes, was hilarious.

        Their solution is to essentially alias the webkit prefixes to their own. Fine, right? But what happens if there's directives for both? Well, the last one specified overrides. Note that not the vendor-specific one that applies to that vendor's browser overrides, just the last one specified.

        So when it comes time to build a site that works well on all browsers, including the ones that use such aliasing, what do they suggest?


        blah {
        -webkit-foo : bar;
        -moz-foo : bar;
        -ms-foo : bar;
        -o-foo : bar;
        foo : bar;
        }

        But then they also note that for some features, they don't support the prefix-less version for reasons of it not being finalized yet.

        So let's say webkit specifies a blue background, moz specifies a yellow one, and o specifies red. When you view it in Opera it will be? red.
        Now you view it in a Mozilla browser, using the same aliasing nonsense, what color will it be? red. Opera's. Because that was specified last.
        Want to fix it to yellow? You'll have to specify the moz line last.
        Except that then Opera will also render it in yellow.

        It's all good and well to want to accept other vendors' prefixes, but why would you not let your own override, rather than the last-specified? I realize that as CSS goes, last-specified is supposed to override when there are conflicting specifications... but given the vendor-specific prefixes, there is no actual conflict.

        Most hilariously, they already anticipated one response... "So I only need to use -webkit- prefixes now? w00t!" and answered it with "absolutely not." and then go on to give a very, very weak defense for why developers shouldn't do exactly that. Use the webkit prefixes where webkit doesn't make use of the non-prefixed version, use the non-prefixed version to make the page future-proof (assuming the behavior stays the same, but them's the breaks), and call it a day, because Opera now supports the webkit prefix, Mozilla apparently intends to support it, and IE... well, IE...

        • The same applies to things outside of the CSS realm, like the apple-touch-icon link. Android uses it. Yep - want pretty bookmarks on Android? Specify the Apple (by name) icons. Largely this is because the standards people are moving way, way too slow.

          Didn't we already have link rel="icon"? Apple fucked around for no good reason that I can see. All they did was make people add more crap to their page heads, to make those pages say they same thing they were already saying, a new way.

          Combined with Microso

        • by guruevi ( 827432 )

          The CSS rules specify that the last one overrides. So they're still following the rules. They're aliasing a number of -webkit- prefixes because some developers (apparently you) thought that developing for -webkit- gave them good enough results but then the content wouldn't display in Opera or other browsers.

          Why the hell would you want each browser to have a specific color? Your website should look the same regardless of browser, that's what CSS and HTML is for. As you see the example, if you want to use -we

          • The CSS rules specify that the last one overrides. So they're still following the rules.

            No, the CSS rules say that when there are conflicts, the last one overrides.
            For example, if I specify background-color twice for the same selector (or selectors that end up selecting the same elements), then the last-specified overrules any prior ones.

            In the case of the vendor-specific prefixes, however, there is no conflict. Keep in mind that browsers aren't even supposed to be reading other browers/vendor/engine/whate

    • Re:The solution is.. (Score:5, Informative)

      by Anonymous Coward on Wednesday May 09, 2012 @08:50AM (#39940787)

      Because before it's allowed to be a recommendation, it has to have "beta'd" in 2 browsers. So, usually they prefix with the vendor-name (minus webkit browsers which use the engine-name).

      Sometimes they have competing syntaxes, such as in gradients, which webkit and gecko duked out.

      Basically, they need to allow to experiment, allow backwards compatibility (NEVER BREAK THE WEB), and still be able to ship. Prefixes solve this problem.

      The problem most are having with this, is web developers are getting lazy, and on mobile sites only including (pretty much) webkit. So now, IE9Mobile and Firefox Fennac(? is it still called that), are having to implement the -webkit- features because sites look terrible on them, because developers got lazy.

      • by pmontra ( 738736 )
        Agreed but there is more to that. W3C should take its share of blame for not having standardized yet rounded corners and the like. But among W3C members there are also browser vendors, so maybe it's them who don't like to agree on standards with their competitors.
        • by mcgrew ( 92797 ) *

          W3C should take its share of blame for not having standardized yet rounded corners and the like.

          What the GP said about lazy (and perhaps incompetent) developers applies here. My old site had rounded corners in 1997, and in fact had most of the web2.0 crap without the annoying "chase the moving link" game and the more annoying "page scrolls up by itself after I scroll down" (sj-r.com is a really bad offender here).

          You also need to remember that nobody comes to your site because of what it looks like (althoug

          • My old site had rounded corners in 1997

            ... by using tons of nested tables and images (but not background images, mind you -- those weren't around in '97). Which means more requests and a more complicated document for the browser to render. You may think you're a badass web designer for doing that, but in reality you were just adding load time for your users. Photoshop probably did all the work for you anyway.

            ...they come to your site for its content

            If that was true, then all websites would be black serif font on a white background with a standardize navigation either to the left or to

            • by mcgrew ( 92797 ) *

              The tables weren't nested and the images were small. I've always been a limited maximalist in design, minimalist in code. I laid it out so something interesting happened while loading; for example, one month I had a very small animated gif that tiled for the background that started as green ones and zeros wich changed and eventually disappeared as the page loaded. Very little javascript, always short programs, and only when needed. Its pages weiged in at far less than almost all of today's web pages.

              Back in

          • Still, not having to mess around with nested divs and the like just to get fairly basic design features is nice and allows you to put more effort into other parts of the site (such as content and actual features).

      • The problem most are having with this, is web developers are getting lazy, and on mobile sites only including (pretty much) webkit. So now, IE9Mobile and Firefox Fennac(? is it still called that), are having to implement the -webkit- features because sites look terrible on them, because developers got lazy.

        Developers are not "lazy". They just don't want to write out the same fucking CSS property 5 times to get it work correctly in all browsers. Especially when there's syntax difference other than the prefix in all 5 declarations.

        That's kinda the point of TFA: this model is trying to solve some theoretical problem, but is it really a problem? We didn't have prefixes back in HTML4 days, and so what? innerHTML (an IE invention that was quickly picked up by other browsers) turned out just fine in the end - part o

    • Re:The solution is.. (Score:5, Informative)

      by chrissigler ( 1930758 ) on Wednesday May 09, 2012 @09:01AM (#39940905)

      In some cases, different engine authors have different ideas of what the best way to define the spec would be. And given that there's no solid standard yet, they want to do it the way they want to do it. And over time, they can even change their minds, perhaps submitting to the weight of the broader industry.

      For example, consider Webkit's two implementations of a simple linear gradient, from black at the top to white at the bottom:

      -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff)); /* older webkit method */
      -webkit-linear-gradient(top, #000000 0%, #ffffff 100%); /* newer webkit method */

      Note that the "new" approach to the arguments is based more on the emerging "standard" (implemented the same way with -ms-, -moz, and -o- prefixes). But when you're out there before the standard emerges (or better yet, is defined), you don't just presume to define the standard.

      Or, at least that's how I imagine it went down...

      • In this particular case, it doesn't look like they actually need two different property names to distinguish the two. Just try to parse the value assuming that it uses the new standardized syntax; if that fails, parse it using your legacy syntax.

        Are there any real cases of prefix properties where the value syntax was different, and it couldn't be distinguished from the later standard syntax by looking at the value alone?

    • Because the standard won't be done for like a bajillion years, and the correct syntax could change. The prefixes are supposed to be dropped at the earliest opportunity by site implementers, and should serve as a warning to the coder that the feature they're toying with isn't done yet—unfortunately, W3C has once more underestimated the cargo-cult mindset of web developers.
    • Because many of the prefixed CSS properties have not actually been fully standardised, so having vendors support them with prefixes and varying (possibly incomplete!) implementations/syntaxes means we actually get to try the various approaches being proposed, and only pick one to standardise on once the dust has settled and people have made up their minds as to which one is better.
    • When ANY browser does something non-standard, it breaks the web. Period.

    • The idea is to allow experimental feature implementations (that may differ between browsers).

      The problem is with web developers who don't just use them in production environments but actually rely on them.

      I'll admit I've used them a few times in production environments but the reasons have been:

      1. I wanted to support older versions of browsers which had the features implemented but only using a prefix.
      2. To provide extra eye candy for those running more recent browser versions.
    • by Firehed ( 942385 )

      Because the interface hasn't been defined yet. They're making experimental functions with no standard interface, so the prefix indicates it's not designed for production use yet. Look at CSS gradients, and even border-radius: until relatively recently, there were multiple different ways to achieve the same effect depending on the browser and that vendor's prefix: -moz-border-radius-topleft vs -webkit-border-top-left-radius (the latter won out and is now the standard, sans prefix) further complicated by non

    • by jrumney ( 197329 )
      The idea is that browser vendors use these prefixes for experimental implementations that are not yet part of the CSS standard. I think the main problem is not the prefixes themselves - which prevent a property being defined which eventually ends up being incompatible with the standard when it is approved, and also let developers know that the property may be subject to change in future. The main problem is that each vendor has to have their own unique prefix. If a standard prefix like "proposed-" could b
  • by Anonymous Coward on Wednesday May 09, 2012 @08:43AM (#39940683)

    Browsers should have an option to enable support for their experimental features and ship with the option turned off. If the masses have feature-enabled browsers, these features will be used in production websites. The only way to prevent fragmentation is to keep fragmenting features out of the installed base.

    • by azalin ( 67640 )
      Amen. It's rather tiring to explain customers over and over again why not to use the shiny bling they saw on some other site recently. Experimental tags are useful but should not be used in production web sites. The problem is however that it takes forever until some new and useful features are finally part of the standard.
      My solution would be twofold first speeding up the decision process and second mark experimental features "experimental" and drop them when they have been integrated into the standard o
    • Re: (Score:3, Insightful)

      by Anonymous Coward
      If microsoft didn't push out their ActiveXObject("Microsoft.XMLHTTP") in IE 5.5 - and people wouldn't exploit it like mad, we still wouldn't use ajax today.
      • by Anonymous Coward

        The possibility for AJAX lingered so long before it saw widespread use that I have to question if a more standards oriented approach might have been better, i.e. propose a method for Javascript to get and push documents, then make that feature available as an experimental (default OFF) feature, let developers play with it, standardize it and enable it everywhere. AJAX has its problems, which might have been avoided if Microsoft had not set them in stone by making the first implementation the reference for a

        • It's the same old argument - do you want the standard to be a rubber stamping of an ad hoc development with all its quirks and flaws, but available to play with early on in all browsers? Or do you want it to be a polished document produced by a committee of several dozen people deliberating over the fine details of syntax for 2 years, but available very late (and in the meantime, incomplete/fragmented implementations between browsers)?

          TFA argues for the first model. If it works, let it stick, even despite m

  • by orthancstone ( 665890 ) on Wednesday May 09, 2012 @08:46AM (#39940729)
    Get the standard done. Browser vendors are not going to wait 20 years for you to make up your mind. The digital world moves too fast for policy to take too long. Proposed ideas are going through vigorous testing in the real world long before a finalized plan for that idea is set.
    • by Anonymous Coward on Wednesday May 09, 2012 @08:58AM (#39940887)

      The online world is not moving fast at all. Two years ago, a browser from the turn of the century combined with a proprietary plugin was the definition of the usable feature set, because the availability of anything beyond that could not be relied upon. At least until the end of life of Windows XP, the role of holding everybody back falls to IE8. HTML5? No show. The other browser makers can slow the fuck down and concentrate on building secure browsers that don't need to be updated twice in a full moon. Instead we get browser war style feature fragmentation and "best viewed with" (or worse, silent failure) drives people nuts.

      • The world is changing again.

        It moved fast in the 1990s and stalled when Microsoft won browser wars 1.0. Today we have not just desktop browsers, but tablets, phones, and other devices with Webkit potentially become the next IE 6 of this decade.

        Browsers get updated every 6 weeks and even IE is going to get an annual update. True, many corporations will stick with IE 8 and XP if not IE 6 until 2014, but the web will leave them behind as soon as IE 8 and earlier get less than 5% marketshare. According to g.sta

      • The online world is not moving fast at all.

        I think you missed my point. Often enough, new proposed standards are implemented, tested, and accepted/rejected long before the standards are considered viable for the final proposal. A five year discussion might work for a proposal committee, but practical application moves on while they sit around and chew the fat on accepted details across the various platforms.

      • by WankersRevenge ( 452399 ) on Wednesday May 09, 2012 @11:13AM (#39942581)
        At least until the end of life of Windows XP, the role of holding everybody back falls to IE8. HTML5? No show.

        Funny ... I've been writing HTML5 for awhile now and it works fine in ie6 and up. Granted it requires conditionals and some clever use of css, but it renders fine in older browsers and modern browsers get to experience some of the latest features. And no - there is no "best viewed" anywhere in my sites. Everything just works with or without JavaScript all written in standard markup.

        It takes work, but so does anything worth doing.
      • by yuhong ( 1378501 )

        At least until the end of life of Windows XP, the role of holding everybody back falls to IE8. HTML5? No show.

        Or even the 10 years old XHTML and DOM2!

      • Maybe companies should stop touting proprietary features in an attempt to infect the market and strong-arm the standards committees.

    • Remember XHTML? Remember exported templates in C++?

      This kind of experimental features are better done _marked_ as experimental, so they don't need to be supported forever. So I'd go the totally opposite way: force using such prefixes, and request browser makers to drop support X time after a feature is accepted into the standard.

      • It might feel nice to b**ch slap the vendors providing the browsers. But, the reality is that you're only hurting your customers not them. They're the ones that will be furious and fuming about how the software they paid a large sum of money for doesn't work one day after an update is pushed to their machines.
      • So I'd go the totally opposite way: force using such prefixes, and request browser makers to drop support X time after a feature is accepted into the standard.

        Bingo! I learned this lesson from watching multitexture get into OpenGL. It got in there. Now it's everywhere. Started in SGI. Brought to you by 3dfx.

    • by Anonymous Coward

      Get the standard done. Browser vendors are not going to wait 20 years for you to make up your mind.

      You do realise that the W3C is only made of of the browser vendors? The moment all vendors agree is the moment the standard is done.

      • by Skuto ( 171945 ) on Wednesday May 09, 2012 @09:40AM (#39941271) Homepage

        ...and some vendors (mostly Apple, a little bit Google) have an interest in that not happening. So good luck waiting.

        • ...and some vendors (mostly Apple, a little bit Google) have an interest in that not happening. So good luck waiting.

          What evidence do you have for this claim? Apple and Google use the same browser engine and both companies seem quite committed to having markup, CSS, and JavaScript render identically in their browsers.

          In other words, Apple and Google are fierce competitors but they are both sane enough to understand the benefit of shared web standards and both companies are leading the way in browser innovat

      • The moment all vendors agree is the moment the standard is done.

        And since that process applies to every damn detail in the standard, it is no wonder that they all just implement experimental ideas immediately rather than wait for the standard to be completed. Consensus takes forever.

    • by gr8_phk ( 621180 )

      Get the standard done. Browser vendors are not going to wait 20 years for you to make up your mind.

      And excellent point. And in the mean time, sites should avoid browser-specific features. This is not just "MS did it wrong, gotta support that variant", in this case the prefix actually indicates a browser specific implementation. If you want to burden yourself with it feel free, but don't complain. If you must complain, complain that the standard isn't done - not that you dug yourself a hole with non-standar

    • by grcumb ( 781340 )

      Get the standard done. Browser vendors are not going to wait 20 years for you to make up your mind. The digital world moves too fast for policy to take too long.

      You know that the W3C is an industry consortium, right? In other words, the browser vendors whom you claim are not going to wait are the very same people who are taking too long to finalise the standard.

      Proposed ideas are going through vigorous testing in the real world long before a finalized plan for that idea is set.

      Yeah, that's kind of how things work here. Vendors take a working draft, implement some experimental features based on that, throw a few implementations at the wall to see what sticks, then bring them back to the committee and suggest them as new inclusions in the standard. The committee (filled as it is wit

  • by Anonymous Coward

    I was under the impression that browser prefixes existed to allow use of experimental CSS features before standardization; just ditching the vendor prefix seems like a step backward.

    Can you please just state the fact in an article and not attempt to persuade an opinion? Personal commentary really kills it for us.

    • If you can't handle the concept of editorial bias and persuasion, I suggest you pick up an encyclopedia. If everyone agreed on facts, there would not be much point in regurgitating them in a discussion, unless your at a pep rally.
      Oh.
  • by gstrickler ( 920733 ) on Wednesday May 09, 2012 @09:18AM (#39941027)

    It would be a step in the right direction. Henri Sivonen's response also addresses several valid points, some of which can be addressed with minor mods to the proposal, some of which can be addressed (but not solved) by issuing guidance to vendors and authors. Having developed data communications standards and software in another industry, I'm well aware of the issues caused by non-compliance, insufficiently (and overly) specific standards, and that vendors and authors do not always follow the guidance (mostly because the developers rarely read it).

    Most importanly, this proposal gives a clear, standard method for both authors and browser vendors. When it comes to getting compliance and compatibility with a standard, the simpler it is, the better for everyone.

  • First of all, this "proposal" is coming from the fine folks over at Opera. And the "problem" is that people are using prefixes, just not their prefix (-o-). So they want to do away with them. Just last week they announced they were going to copy webkit's prefix, so I really don'y know why they are proposing this.

    • by Skuto ( 171945 ) on Wednesday May 09, 2012 @09:42AM (#39941299) Homepage

      They're proposing this because the other "solution" they announced obviously totally sucks (but they have no choice).

      To pretend this is only Opera's problem is silly. It's an everybody-who-is-not-Webkit problem. Which is why Mozilla said they will do the same, and if Microsoft ever gets any mobile devices out, they'll have the same problem.

      • if Microsoft ever gets any mobile devices out, they'll have the same problem

        Ironically, it was already done [zdnet.com] in the very first release of WP7 (for one particular property), but developer feedback [msdn.com] was overwhelmingly negative, so it was reverted.

    • Non-Opera prefixes are often used together, and sometimes in production. There is usually an no-prefix rule and two more, one with -moz- and one with -webkit- , and sometimes an -ms-. But Opera often gets left out since they're not that popular. Copying the Webkit prefixes will let them render correctly when there isn't an -o- prefix.

      First of all, this "proposal" is coming from the fine folks over at Opera. And the "problem" is that people are using prefixes, just not their prefix (-o-). So they want to do away with them. Just last week they announced they were going to copy webkit's prefix, so I really don'y know why they are proposing this.

      Opera wants this because the little players in any market want standardization, and the market leaders always want something along the gradient of 'freedom to innovate' to 'pro

  • CSS is annoying (Score:5, Insightful)

    by Lord Lode ( 1290856 ) on Wednesday May 09, 2012 @09:28AM (#39941141)

    CSS is supposed to separate content from layout. However so many layout things cannot be done with CSS in straightforward and portable ways.

    Something as basic as vertically centering text is impossible.

    Putting things left, right, in a horizontal row or in a vertical row is a nightmare that usually involves creating more HTML elements anyway instead of being able to use pure CSS.

    You can't make adaptive colors in CSS, like a shadow color automatically calculated from another color.

    On top of that, you can't inherit from CSS classes so have to duplicate the same thing multiple times if you don't want to give each element multiple classes.

    How about a new standard, replacing CSS, that truly allows separation of content and style in modern web apps?

    • All they have to do to get a true separation of content from layout is add the ability for constants. Then in one file you can define $CENTER_TEXT="Lorem ipsum dolor sit amet, consectetuer adipiscing..." $HEADER_TEXT="elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam" and then in your main page have your layout formatting. Problem solved instantly by allowing you to remove the content, and accepting that HTML is necessary for layout.

      Won't solve the vertical centering problem, t
    • The centering bits are a problem, but for the others -- use a CSS pre-processor. (Sass [sass-lang.com], LESS [lesscss.org], Scaffold [github.com], Compass [compass-style.org], Stylus [github.com],etc.)

      There are ones that are more Ruby-ish, or Python-ish, etc. Some can calculate colors (darken, lighten, blend, etc.), but almost all let you set things to variables so they can be set in one place and used multiple times.

      (and none of this is really new -- I know folks that were using ColdFusion, PHP or even Perl to generate their CSS a good decade or so ago ... it's a page of text,

    • To continue my rant:

      You can't properly choose independently if an element is focusable by mouse only, or by keyboard with tabbing only.

      You can't properly to make it break text into multiple lines if a single word is too long and you really want it to break text inside the width of your element. Websites all over the place are now using JS to insert random spaces in long strings like URLs due to this.

      Why can't you say with CSS: The text gets THIS area to render itself in, so the text STAYS in there, do the b

    • by lee1 ( 219161 )

      You can't make adaptive colors in CSS, like a shadow color automatically calculated from another color.

      You can use CSS compilers, like CleverCSS, for this.

      if you don't want to give each element multiple classes.

      But that's the best [csswizardry.com] way to do it.

      • by Trogre ( 513942 )

        Yes but if you're resigned to using a compiler then you may as well do away with CSS entirely and compile your site into straight HTML.

        • by lee1 ( 219161 )
          I don't follow. You still get all the advantages of separate semantic markup and styling, of only requiring the user to download the styling information once, of being able to reuse your stylesheets, and of allowing the user to substitute his own stylesheet.
    • by arnodf ( 1310501 )

      I suggest a name for the replacement: Advanced Style Sheet or ASS

    • by allo ( 1728082 )

      > vertically centering text
      because there is no vertical middle. your document is (potentially) endless in vertical dimensions. you want to center it in the window, but the window can become arbitrary large/small.

      • If you have a div with a certain width and height, you should perfectly be able to center text horizontally and vertically. And UI designers of a web app can and will put the text of every thing centered.

        It's such a basic, simple, logical, thing to do that it is really annoying of CSS to not have such a fundamental concept.

    • by Tom ( 822 )

      You can't make adaptive colors in CSS, like a shadow color automatically calculated from another color.

      On real browsers (i.e. anything except IE, at least up to 8, not sure about 9) you can come very close by using rgba colours for the shadow.

      On top of that, you can't inherit from CSS classes so have to duplicate the same thing multiple times if you don't want to give each element multiple classes.

      But giving elements multiple classes is kind of the whole idea. I regularily have one class that sets the layout stuff and one that sets colours, etc.

      How about a new standard, replacing CSS, that truly allows separation of content and style in modern web apps?

      Why? Just because it isn't perfect you want to replace it with something that for many years will be lagging behind?

    • by bricriu ( 184334 )

      The aligning problems you cite are exactly the sorts of new features that are subject to the prefix problem -- see the flexbox spec (at http://www.w3.org/TR/css3-flexbox/ [w3.org])... and then see the 2009 flexbox spec (at http://www.w3.org/TR/2009/WD-css3-flexbox-20090723 [w3.org]). Most browsers (minus the IEs) support the old version. A few Chrome versions -- NOT -webkit-*, just Chrome -- support the new syntax (see http://caniuse.com/flexbox [caniuse.com]).

      So, to sum up: we have this new standard you desire, but the problem addresse

    • Something as basic as vertically centering text is impossible.

      Putting things left, right, in a horizontal row or in a vertical row is a nightmare that usually involves creating more HTML elements anyway instead of being able to use pure CSS.

      CSS3 Grid Layout [w3.org] - which is basically an adaptation of the traditional desktop UI layout model as seen in Swing, Qt etc - finally fixes that. The only catch is that, so far, the only supporting browser is IE10 beta...

  • Constants (Score:4, Insightful)

    by phantomfive ( 622387 ) on Wednesday May 09, 2012 @09:39AM (#39941257) Journal
    Can we have constants now? That is the number 2 limitation of HTML/CSS right now. Cascading is great, but if you want to change your style, you STILL have to change the color value all over the place. What exactly are they worried about? Unreadable web pages? Have they looked at the web lately?
    • by jbov ( 2202938 )

      you STILL have to change the color value all over the place

      You're doing it wrong. There are 146 color names already provided to you. These should provide sufficient color selection for any site. In addition, each color has a very easy to remember, concise name, such as LightGoldenRodYellow [w3schools.com].

      It is best to use these standard names instead of trying to decide on your own variable names. Committees of highly intelligent architects have already decided on the best names for you. For example, see the distinction between Lime [w3schools.com] and Lime Green [w3schools.com]. My personal favorite: Brown [w3schools.com], wh

      • It's a good thing we have such an intelligent committee of dedicated architects choosing names so I don't need constants. I would have foolishly called my color Griy.
    • The trick is to write the CSS as a PHP file, but make sure it is only parsed rarely, and cached. On the server, create "style.php" (linked from thje main HTML just as if it were a normal style.css file). Then fix the caching and mime-type. Result: easy to write, still efficient.

      //Respond with 304 (not-modified) unless the file is changed. This means the PHP file is only evaluated once per client per session.
      $last_modified_time = filemtime(__FILE__);
      $etag = md5_file(__FILE__);

      header("Last-Modified: ".gmdate(
      • That's a fine trick, and it is clearly beneficial since you are willing to go to such an effort to do it, but this only demonstrates how truly constants are needed in CSS, because everyone is making their own hacky workaround.
  • IMHO the use of vendor prefixes was the right thing to do, and remains exactly the right thing to do.

    The problem instead is that the standardisation process is taking far too long.

    2D transforms, 3D transforms, transitions and animations still aren't officially standardised. They've existed for years, and are now supported in all major browsers (if one includes IE10), and are all essentially compatible. There's mostly only been minor tweaks to them all since they first appeared. Yet these CSS3 features are all at "working draft" stage. Indeed, the 3D transforms spec is a working draft, dated March 2009, over 3 years ago. It's absurd.

    The real solution should be instead to expedite the standardisation process. That way the vendor prefixes can vanish much faster.

    • by BZ ( 40346 )

      What happened with those specs is that Apple proposed the drafts and Apple employees were the original editors (which all makes sense so far)... and then they did absolutely nothing for a while. Completely ignoring feedback mail, not fixing obvious bugs in the text (e.g. the text totally not matching what every browser, including WebKit, implements).

      Hard to expedite the standardization process when some participants sandbag.

      After a bit of this, new editors got assigned to the drafts, and they're making bet

  • I have write a lot of open source software. I am OSS supported as the next guy, and for OSS standards are very important.

    But standards are not more important than progress. With the current system, browser creators can invent any fun stuff and add it on the next update this week. And it don't break anything. And theres nothing bad in that.

    About webmaster using it, what is wrong is the level. Wen a JQuery extension or a CSS library (think... reset.css) use a extension, is Ok, because it abstract a prob

    • The problem is that the system is broken. The web is starting to be written to webkit in much the same way as it used to be written to IE6, even where it doesn't make sense. Using a library is already possible and is already not working. It doesn't matter whether you think it's really the web developer's fault for not using libraries, or the library's fault for not being updated; it's happening.

      That doesn't mean I agree with this proposal. I'm wondering if there's a new thing that can be introduced that

  • The real solution to the problem is to make the experimental features more obviously experimental.

    It should be mandatory that a pre-standardised feature be disabled by default in the browser, and enabled via a preference setting for developers to try them out.

    Most non-developer users would not bother to fiddle with these prefs, and thus the features would remain truly experimental until they were standardised.

    Yes, this would mean that developers would get frustrated by stuff they want to do which is tantali

Perfection is acheived only on the point of collapse. - C. N. Parkinson

Working...