News for hackers. Stuff that matters.
Re:CSS3 proven to be Turing complete? by forrestthewoods on Tuesday December 15, 2015 @12:50PM (#10739173)
That's horrifying. And I'd argue a damning indicator that CSS3 is wildly overcomplicated. It really shouldn't be Turing complete.
Re:CSS3 proven to be Turing complete? by PeCaN on Tuesday December 15, 2015 @01:13PM (#10739356)
Heck, it means that theoretically you can't verify a CSS3 stylesheet for correctness because you don't know the stylesheet will ever finish rendering.

In practice it's probably not a problem since you don't have infinite HTML, but it is theoretically slightly disturbing.

I'm an advocate of provably-correct, non-Turing-complete languages, which really should include CSS....

Re:CSS3 proven to be Turing complete? by Dylan16807 on Tuesday December 15, 2015 @01:39PM (#10739527)
This proof does not imply that. It cannot loop without you clicking all the boxes.
Re:CSS3 proven to be Turing complete? by PeCaN on Tuesday December 15, 2015 @03:47PM (#10740355)
A static analyzer doesn't know that you won't click all the boxes though.
Re:CSS3 proven to be Turing complete? by Dylan16807 on Tuesday December 15, 2015 @04:17PM (#10740539)
It still renders in O(n) time where n is the number of elements.

You don't need Turing completeness to have trouble caused by user input. Imagine a million check boxes where the only rule is that they shrink by a pixel when checked. That should be about the same difficulty to analyze as the 110 rule checkboxes. Each input only affects the styling of 1-3 nodes.

Re:CSS3 proven to be Turing complete? by akerro on Tuesday December 15, 2015 @12:53PM (#10739200)
Can you center images yet? :>
Re:CSS3 proven to be Turing complete? by talmand on Tuesday December 15, 2015 @01:20PM (#10739401)
Such knowledge exists, but it requires a long and dangerous journey filled with adventure, thrills, and excitement too bold for most to endure. Many have traveled down that path, but few have returned to tell the tale.

I am one of those few.

I could easily share that knowledge, but for one to fully understand, one must walk such a path thyself guided by the voices from the source that flows over the stacks of such knowledge.

Re:CSS3 proven to be Turing complete? by gotchange on Tuesday December 15, 2015 @01:26PM (#10739446)
As I walk through the valley of shadow of vertical-align, I took a look at my codebase and I realize there isn't much left ...
Re:CSS3 proven to be Turing complete? by forrestthewoods on Tuesday December 15, 2015 @01:28PM (#10739453)
http://howtocenterincss.com/

Good luck and God speed. There's no shame in turning back.

Re:CSS3 proven to be Turing complete? by dasil003 on Tuesday December 15, 2015 @12:58PM (#10739252)
I get the joke since I've been doing the web design thing for a couple decades at this point, but in case your question was serious, yes it is finally solved:

https://philipwalton.github.io/solved-by-flexbox/demos/verti...

Re:CSS3 proven to be Turing complete? by meesterdude on Tuesday December 15, 2015 @01:00PM (#10739270)
came to say the same thing. I love love love flexbox. I just wish i could drop all the vendor prefixes, but safari seems to be the holdout iirc
Re:CSS3 proven to be Turing complete? by gotchange on Tuesday December 15, 2015 @01:22PM (#10739414)
Isn't IE =< 10 supported by the Felxbox model?