Live data from Hacker News

Mass-unprefixing in Firefox 16

paulrouget.com

31–40 of 45 posts

Re: Mass-unprefixing in Firefox 16

#31
post #29

I hope I will not see many more of this kind of news. Dear browser makers, please, enable your prefixed CSS properties only in dev/night/beta builds. Leave only unprefixed CSS properties in the release stable browsers. With this you will be able to test new features, show them to web developers and, at the same time, save them from the madness of maintaining five different slightly different versions of new CSS prope…

That's exactly what Firefox developers like Henri Sivonen [1] and David Baron [2] think, and their proposals have a lot of support within Mozilla and a high chance of being adopted. It would be great to get other vendors on board too.

[1] http://hsivonen.iki.fi/vendor-prefixes/ (see "Keep Experimental Features in Experimental Builds")

[2] https://groups.google.com/d/msg/mozilla.dev.platform/itl6mtx... (dbaron is Mozilla's representative to the W3C Advisory Committee as well being a principal engineer on the layout team and deeply involved in the development of CSS over the past decade.)

Re: Mass-unprefixing in Firefox 16

#32
post #29

I hope I will not see many more of this kind of news. Dear browser makers, please, enable your prefixed CSS properties only in dev/night/beta builds. Leave only unprefixed CSS properties in the release stable browsers. With this you will be able to test new features, show them to web developers and, at the same time, save them from the madness of maintaining five different slightly different versions of new CSS prope…

From the first bug linked from the article (at https://bugzilla.mozilla.org/show_bug.cgi?id=762302):

    The CSS Working Group has agreed to give the go-ahead to browser implementers to unprefix CSS3 Transitions, Transforms, and Animations:

    http://lists.w3.org/Archives/Public/www-style/2012Jun/0105.html
So contrary to your comments, they're doing this because the W3 said that it's time to do so.

Re: Mass-unprefixing in Firefox 16

#34
post #6

I personally think we should cut down on prefix use. Whilst it may be impractical to completely eliminate them, they are a PITA for developers, and have made the mobile web too heavily reliant on WebKit.

I know, i am using transitions/gradients on my project and i have to write 5(!) different rules just to set one property. This is for production code. background: -webkit-linear-gradient(#fff, #fdd 75%, #fcc); background: -moz-linear-gradient(#fff, #fdd 75%, #fcc); background: -ms-linear-gradient(#fff, #fdd 75%, #fcc); background: -o-linear-gradient(#fff, #fdd 75%, #fcc); background: linear-gradient(#fff, #fdd 75%, #…

Does WebKit implement unprefixed property names alongside -webkit- prefixed names?

Re: Mass-unprefixing in Firefox 16

#35
post #6

I personally think we should cut down on prefix use. Whilst it may be impractical to completely eliminate them, they are a PITA for developers, and have made the mobile web too heavily reliant on WebKit.

I know, i am using transitions/gradients on my project and i have to write 5(!) different rules just to set one property. This is for production code. background: -webkit-linear-gradient(#fff, #fdd 75%, #fcc); background: -moz-linear-gradient(#fff, #fdd 75%, #fcc); background: -ms-linear-gradient(#fff, #fdd 75%, #fcc); background: -o-linear-gradient(#fff, #fdd 75%, #fcc); background: linear-gradient(#fff, #fdd 75%, #…

Looks like this is begging for a macro. Write it once, highlight, ctrl+something, the other specific versions are automatically created in place.

Re: Mass-unprefixing in Firefox 16

#36

I personally think we should cut down on prefix use. Whilst it may be impractical to completely eliminate them, they are a PITA for developers, and have made the mobile web too heavily reliant on WebKit.

Maybe this is pigheaded or troglodyte-esque of me, but I solve this problem by refusing to use any CSS 'features' that require prefixes.

I can live without gradients, my life will go on.

Re: Mass-unprefixing in Firefox 16

#37
post #36

I personally think we should cut down on prefix use. Whilst it may be impractical to completely eliminate them, they are a PITA for developers, and have made the mobile web too heavily reliant on WebKit.

Maybe this is pigheaded or troglodyte-esque of me, but I solve this problem by refusing to use any CSS 'features' that require prefixes. I can live without gradients, my life will go on.

Hmm, good point. In general I rarely use special prefixed CSS features, and the ones that I do are rarely worth the effort.

Re: Mass-unprefixing in Firefox 16

#38
post #22

Earlier quoted context omitted.

If you're running the LESS compiler on every request, you're doing it wrong. Doing that might make sense in development, but for deployment you're expected to run the compiler once to generate a single static, minified CSS file. Same as JS compilers/minifiers in that respect. As far as what these compilers do? Yes, CSS is nice enough as it is; that's why these compilers don't mess with the syntax too much. Most of wh…

> you're expected to run the compiler once to generate a single static, minified CSS file. Yes, i stand corrected on that, i don't use them but that is not an excuse for ignorance. Plus compiling once makes more sense than compiling every time. I also use webkit's web inspector for making live changes to a stylesheet and then saving the file in the end, very convenient compared to the changing-saving-uploading-refres…

The most elegant way to handle this (IMO) is to use a combination of Compass(http://compass-style.org/) and Vogue(http://aboutcode.net/vogue/).

Compass has a great command line feature called "watch" that simply watches for file system events (linux, os x) or polls (windows) your folders for changes and recompiles your stylesheets.

Vogue detects stylesheet changes right away and reloads them in your page via WebSockets.

Instead of dealing with Chrome's inspector, making changes, then copying them to your CSS (and translating if you like SASS), I simply make changes in my editor on one monitor while watching my site on the other monitor. The overhead is minimal - I see changes within about 500ms.

Compass is great even just as a build tool, and I used it before I learned SASS. It's fantastic for its simple mixins like linear-gradient and even better when you start chaining them together. One of my favorite mixins I use throughout my code:

  @mixin buttonGradient($color){
    @include basicBackgroundGradient($color);
    &:hover, &.hover{
        @include basicBackgroundGradient(hover-color($color));
    }
    &:active, &.active{
        @include basicBackgroundGradient(active-color($color));
    }
  }

  @mixin basicBackgroundGradient($color, $percent:12%){
    background: $color;
    @include background-image(linear-gradient($color, darken($color, $percent)));
  }
Then, anywhere I want a green button to be created, I use the style @include buttonGradient(green);. Or any color. Keeping a stylesheet full of site-wide colors is incredibly useful and being able to modify them via functions like darker() and lighter() really saves time. Consider that this simple include actually generates 18 lines of CSS each time I invoke it - in the words of an old boss, now you're really cookin with gas.

Re: Mass-unprefixing in Firefox 16

#39
post #6

Earlier quoted context omitted.

I know, i am using transitions/gradients on my project and i have to write 5(!) different rules just to set one property. This is for production code. background: -webkit-linear-gradient(#fff, #fdd 75%, #fcc); background: -moz-linear-gradient(#fff, #fdd 75%, #fcc); background: -ms-linear-gradient(#fff, #fdd 75%, #fcc); background: -o-linear-gradient(#fff, #fdd 75%, #fcc); background: linear-gradient(#fff, #fdd 75%, #…

Looks like this is begging for a macro. Write it once, highlight, ctrl+something, the other specific versions are automatically created in place.

I recently switched to Sublime Text[1] as my editor of choice, and one of the available packages is a macro that runs CSS blocks through prefixr[2]. It's been an absolute godsend (and Sublime Text in general is ... sublime.)

[1] http://www.sublimetext.com/

[2] http://prefixr.com/

Re: Mass-unprefixing in Firefox 16

#40
post #22

Earlier quoted context omitted.

> you're expected to run the compiler once to generate a single static, minified CSS file. Yes, i stand corrected on that, i don't use them but that is not an excuse for ignorance. Plus compiling once makes more sense than compiling every time. I also use webkit's web inspector for making live changes to a stylesheet and then saving the file in the end, very convenient compared to the changing-saving-uploading-refres…

The most elegant way to handle this (IMO) is to use a combination of Compass( http://compass-style.org/ ) and Vogue( http://aboutcode.net/vogue/ ). Compass has a great command line feature called "watch" that simply watches for file system events (linux, os x) or polls (windows) your folders for changes and recompiles your stylesheets. Vogue detects stylesheet changes right away and reloads them in your page via WebS…

Actually chrome has this feature too. When you have saved a file once manually, it keeps track. So whenever you make live changes on the resources panel it live updates the DOM and upon clicking save, it automatically rewrites the file at it's original location. So it pretty much mimics the solution you suggested without any command line tools, extra file inclusion, downloads, etc. (http://www.youtube.com/watch?v=3pxf3Ju2row)

If you go up, you can read my comment in which i say why i dont like extra libraries, compilers for web work. (http://news.ycombinator.com/item?id=4219980) This is pretty much why.

And for the global mixin, (Which is pretty cool IMO, it really enables a lot more possibilities and creativity) you pretty much give the reason not to use them anywhere out side of practice work. 18 lines are huge. Plus css variables are pretty much on horizon, it is well worth the wait.

Post reply on HN