News for hackers. Stuff that matters.
Re:Show HN: CSS Filter Effects by viggity on Thursday May 07, 2015 @10:00AM (#9505063)
I've used the filter effects for a lot of really useful applications. I'm always surprised though that sepia is an offered filter. It seems pretty kitsch and not that useful, it is effectively grayscale with an additive color overlay of only one color. I don't mind that it is there, but it doesn't seem like a primitive operation like the rest. Perhaps if you could change the overlay then it'd be a lot more useful.
Re:Show HN: CSS Filter Effects by ErikHuisman on Thursday May 07, 2015 @07:12AM (#9504218)
These css effects are pretty cool. But front-enders beware, they can be supersuper slow when trying to animate or even scroll (especially on mobile). If you want to use blurred images let a server do the burring for you.
Re:Show HN: CSS Filter Effects by TazeTSchnitzel on Thursday May 07, 2015 @07:40AM (#9504325)
Or blur with canvas, so you only do the client-side operation once?
Re:Show HN: CSS Filter Effects by leppr on Thursday May 07, 2015 @01:26PM (#9506736)
Yea, they seem to be too expensive to use for full page effects, but I haven't found them to impact performance if used with parsimony on a few select elements with no children.
Re:Show HN: CSS Filter Effects by Thiz on Thursday May 07, 2015 @09:52AM (#9504998)
In Safari, the blur effect should not extend over the boundaries of the object.

Is that a bug or a feature?

Btw, there are some interesting ideas for sliding captchas.

Re:Show HN: CSS Filter Effects by nness on Thursday May 07, 2015 @10:02AM (#9505082)
There overflow: hidden; on one of the its parents, so you'd assume that it shouldn't blur outside of the parent container. I'd call that a bug.
Re:Show HN: CSS Filter Effects by SimeVidas on Thursday May 07, 2015 @08:28PM (#9509334)
[Spec](http://dev.w3.org/fxtf/filters/#filter-region-for-shorthands) hints at this being expected behavior:

“Furthermore, if a shorthand filter expands this visible area like it is the case for <blur()> or <drop-shadow()> the filter region must cover this area as well.”

Re:Show HN: CSS Filter Effects by dschep on Thursday May 07, 2015 @11:19AM (#9505665)
Firefox behaves the same way AFAICT. http://i.imgur.com/YCygCb7.png
Re:Show HN: CSS Filter Effects by UUMMUU on Thursday May 07, 2015 @09:17AM (#9504786)
I had way too much fun sliding the Hue Rotation back and forth to create Disco Kitty. Thanks for sharing, I knew about blur and opacity but the rest of these were new to me.
Re:Show HN: CSS Filter Effects by monk_e_boy on Thursday May 07, 2015 @09:48AM (#9504971)
This could be the new blink tag!
Re:Show HN: CSS Filter Effects by lalwanivikas on Thursday May 07, 2015 @10:36AM (#9505315)
CSS filters are cool! I also made something similar few months back: http://lalwanivikas.github.io/image-editor/
Re:Show HN: CSS Filter Effects by andrewmu on Thursday May 07, 2015 @10:52AM (#9505452)
I'm wondering why the greyscale and saturation filters were both necessary. greyscale(0) == saturation(1.0) and greyscale(1.0) == saturation(0.0), with afaik a linear scaling between either.
Re:Show HN: CSS Filter Effects by sebnukem2 on Thursday May 07, 2015 @11:16AM (#9505640)
Now what would be really cool is the ability to define a filter function in JS callable from the CSS. Of course one can do that with canvas.
Re:Show HN: CSS Filter Effects by leni536 on Thursday May 07, 2015 @08:25AM (#9504526)
Cool stuff. Alternatively you could embed images in SVG and apply SVG filters, but it's quite more complicated.
Re:Show HN: CSS Filter Effects by atkaye on Thursday May 07, 2015 @08:34AM (#9504567)
Small typo on "Hue Roatate" FYI
Re:Show HN: CSS Filter Effects by naeemnur on Thursday May 07, 2015 @08:39AM (#9504585)
Fixed it, thanks!
Re:Show HN: CSS Filter Effects by kylelibra on Thursday May 07, 2015 @10:44AM (#9505383)
These are cool, but seems like in cases where you want to blur something out on an image you should do so in photoshop on the actual image and not with css. Otherwise someone could just use element inspector to delete the blur effect.
Re:Show HN: CSS Filter Effects by wmeredith on Thursday May 07, 2015 @11:09AM (#9505586)
In those cases you are correct, but what if you're building a cloud based SAAS that lets users manipulate photos, then save the result? This stuff has a lot of uses.
Re:Show HN: CSS Filter Effects by audessuscest on Thursday May 07, 2015 @08:28AM (#9504537)
Is there any difference between opacity and filter: opacity ?
Re:Show HN: CSS Filter Effects by talmand on Thursday May 07, 2015 @10:03AM (#9505088)
As far as I know, there's no difference in the outcome. Opacity is handled by most browsers through hardware and I would imagine the filter method does the same. I would hope they are handled the same because it would seem wasteful to have two methods that do the same thing.

Somewhat useless thought, opacity and the opacity filter can be combined on the same element. If one is set to zero it makes the other irrelevant. If one is set to 100% then it makes itself irrelevant.

Re:Show HN: CSS Filter Effects by polygonplanet on Thursday May 07, 2015 @09:39AM (#9504928)
Pretty cool. It's simple way to test effects.
Re:Show HN: CSS Filter Effects by mikkom on Thursday May 07, 2015 @08:15AM (#9504490)
Doesn't seem to work with firefox/linux.
Re:Show HN: CSS Filter Effects by sebnukem2 on Thursday May 07, 2015 @11:15AM (#9505625)
It does. FF 36 on CentOS 6.6.
Re:Show HN: CSS Filter Effects by fougerejo on Thursday May 07, 2015 @08:22AM (#9504514)
Works on ff 37.0.2
Re:Show HN: CSS Filter Effects by Brakenshire on Thursday May 07, 2015 @08:35AM (#9504572)
And on Firefox for Android. Blur is very slow, though.
Re:Show HN: CSS Filter Effects by nness on Thursday May 07, 2015 @10:04AM (#9505097)
Could be that the blurring isn't being handled by the GPU. CSS 3D-transforms are usually added as a work-around when we want a smoother performance for certain elements by forcing that extra rendering step.