News for hackers. Stuff that matters.
Re:CSS text filling with water by 0x0 on Monday November 11, 2013 @06:47PM (#6714913)
Remove the css line with "@include background clip text" to reveal how it works :)
Re:CSS text filling with water by nevster on Monday November 11, 2013 @07:39PM (#6715125)
Or open it in Firefox.

In other words, if you're a Firefox user, open it in Chrome to see the actual effect.

Re:CSS text filling with water by rurounijones on Monday November 11, 2013 @08:21PM (#6715266)
Ooooh, I thought it looked quite good in Firefox... now I see it wasn't what I was supposed to be seeing.

Looked at it in chrome, very cool.

Re:CSS text filling with water by lbebber on Monday November 11, 2013 @08:23PM (#6715276)
It still looks water-y in Firefox at least, hahah.
Re:CSS text filling with water by adam74 on Monday November 11, 2013 @10:37PM (#6715705)
Here I am looking for sine waves in the code. I need to think simpler.
Re:CSS text filling with water by ChikkaChiChi on Tuesday November 12, 2013 @09:27AM (#6717960)
CSS: We'll add 800 edge-case animation effects but fuck you if you want declarative center positioning.
Re:CSS text filling with water by aroman on Tuesday November 12, 2013 @09:33AM (#6717993)
This is pretty much how I feel most of the time. It often seems like simple things are hard and hard things are simple, and even after years and lots of different projects, I still end up playing "guess-and-check" with complicated centering stuff.
Re:CSS text filling with water by lambda on Tuesday November 12, 2013 @11:01AM (#6718503)
Actually, they're working on both. Flexbox[1] and grid layout for better layout, CSS animation for animation and effects.

Flexbox is usable in the latest versions of most browsers today[2]. Here's an example of declarative centering: http://jsfiddle.net/ac4ug/

[1]: https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexi... [2]: http://caniuse.com/#feat=flexbox

Re:CSS text filling with water by lbebber on Tuesday November 12, 2013 @09:36AM (#6718014)
Hahahah, very true.
Re:CSS text filling with water by sdfjkl on Tuesday November 12, 2013 @03:33AM (#6716516)
background-clip? Sometimes I think CSS has gone a bit too far. Sure, at first it was wholly insufficient, but now it seems to have gone overboard the other way, sprouting too many obscure features, with greatly varying support between implementations to boot.
Re:CSS text filling with water by lambda on Tuesday November 12, 2013 @11:07AM (#6718547)
Some people want these effects. Without them, the choice is to write it all by hand using canvas, or use animated gifs or Flash or something.

Sure, there are varying levels of support of the most bleeding edge features, but browsers are catching up with each other all the time. For real world sites, you use what's widely available, which corresponds to the gee-whiz demos from 5 years ago (give or take, and depending on how many truly obsolete users you need to support). So yeah, this isn't really all that useful outside of a gee-whiz demo now, but in a few years all of the major browsers will support it and people can use it. This kind of effect is most likely to be used in a game that has a large asset library to load, but the underlying functionality can be useful in a variety of designs.

Re:CSS text filling with water by lbebber on Tuesday November 12, 2013 @08:39AM (#6717697)
While I agree that CSS does go too far at times, I don't think this is one of them.
Re:CSS text filling with water by iLoch on Tuesday November 12, 2013 @04:22AM (#6716695)
Yeah, fuck having options! Is there SaaS that will let me ship my website in the form of a newspaper to my customers so they don't have to endure my fancy styles?
Re:CSS text filling with water by mfincham on Monday November 11, 2013 @07:35PM (#6715108)
Doesn't seem to work in Gecko based browsers :(
Re:CSS text filling with water by lbebber on Monday November 11, 2013 @07:38PM (#6715123)
Yeah, it's a pity. There's a workaround for use in production, though I'd have to use an image instead of text.
Re:CSS text filling with water by voltagex_ on Monday November 11, 2013 @10:48PM (#6715739)
Is it a bug that can be raised against Firefox/Gecko?
Re:CSS text filling with water by mcpherrinm on Tuesday November 12, 2013 @12:20AM (#6716011)
Re:CSS text filling with water by mattbessey on Monday November 11, 2013 @06:43PM (#6714897)
DigitalOcean will love this haha
Re:CSS text filling with water by lbebber on Monday November 11, 2013 @09:15PM (#6715451)
I made a version that (should) work on most browsers now (though there's still optimization to be made regarding CPU usage and whatnot).
Re:CSS text filling with water by neovive on Monday November 11, 2013 @10:11PM (#6715620)
Very cool! These demos remind me of the early days of Flash when everyone was experimenting with the potential of animation on the web.
Re:CSS text filling with water by actionscripted on Monday November 11, 2013 @11:39PM (#6715866)
The current wave of CSS3 effects are very much akin to the early days of Flash. Oftentimes it's a superfluous effect that hampers readability or usability, and I sincerely hope some lessons were learned from the Flash heyday. Just because you can move your content in 3D, add transitions and effects -- all in browser-native rules -- doesn't mean you should.

I'm on a pretty beefy Macbook most of the time and there are a lot of simple-looking sites that are almost impossible to use because of the slow-down from their page effects. The scrolling behavior from parallax or fixed effects really seem to be the worst.

If you want to see the next wave of CSS effects, just check out one of the old copypasta providers like DynamicDrive or FlashKit. ;)

Re:CSS text filling with water by ttty on Monday November 11, 2013 @08:19PM (#6715261)
Already in my game loading screen! XD Just some tweaks to include the game name + small loading text. Also added easing and alternate to wave-animation. https://apps.facebook.com/lines-up/

Thanks!

Re:CSS text filling with water by elisee on Monday November 11, 2013 @09:40PM (#6715527)
I would try it out but is there any reason you're requesting so many permissions? That's scary. http://i.imgur.com/X62OVLt.png
Re:CSS text filling with water by yesplorer on Tuesday November 12, 2013 @02:46AM (#6716381)
Wow!! that's an insane amount of permissions required. What's all that for?
Re:CSS text filling with water by ttty on Tuesday November 12, 2013 @04:14AM (#6716663)
I'm asking for all permissions available.. I think it might help in the future when I need something like matching.. I don't know. For now is only using the friends name and online status, if I remeber well.
Re:CSS text filling with water by goldenkey on Tuesday November 12, 2013 @04:59AM (#6716824)
'Bend over and unzip your pants - no rape will occur, trust me'
Re:CSS text filling with water by ElliotH on Tuesday November 12, 2013 @07:54AM (#6717459)
Maybe ask for fewer, then ask for more permissions as you need them?
Re:CSS text filling with water by NamTaf on Monday November 11, 2013 @09:42PM (#6715529)
Firefox 25 and chrome 30.0.1599.101 m are both sitting there on the 'loading' text showing nothing. I left each for a couple of minutes and no dice.

Win7 x64.

Re:CSS text filling with water by gunn on Monday November 11, 2013 @09:55PM (#6715569)
I wonder if background-clip: text; could be used to power a syntax highlighting engine on a simple textarea or contenteditable element?
Re:CSS text filling with water by habosa on Monday November 11, 2013 @07:13PM (#6715011)
I don't know nearly enough about CSS ... how does this work?
Re:CSS text filling with water by lbebber on Monday November 11, 2013 @07:59PM (#6715187)
It's a wavey background masked by the text, that loops scrolling horizontally, and increases in height to show loading progress. It uses the background-clip:text property that is not very widely supported, though.
Re:CSS text filling with water by bzbarsky on Monday November 11, 2013 @10:04PM (#6715605)
It's not only not widely supported, it's also totally nonstandard. It's nowhere in http://dev.w3.org/csswg/css-backgrounds/ or in http://dev.w3.org/csswg/css-backgrounds-4/
Re:CSS text filling with water by adrianlmm on Monday November 11, 2013 @10:31PM (#6715681)
Does't work in IE11, the water overflow the text.
Re:CSS text filling with water by nej on Tuesday November 12, 2013 @03:50AM (#6716584)
Too much water lol
Re:CSS text filling with water by stefan_kendall on Monday November 11, 2013 @08:11PM (#6715233)
Left it open, and now my laptop fans are spinning and the laptop is hot.
Re:CSS text filling with water by lbebber on Monday November 11, 2013 @08:22PM (#6715268)
Hahah, there's that.