Live data from Hacker News

CSS now has an if() conditional function

caniuse.com

241–245 of 245 posts

Re: CSS now has an if() conditional function

#241

Earlier quoted context omitted.

If only Lisp had better presense in modern code editors. Emacs is not enough, especially on Windows where it is super slow. I think this is what actually stops newcomers to start with Lisp and not Python

> I think this is what actually stops newcomers to start with Lisp and not Python What stops newcomers is knee-jerk reactions about the (lack of) syntax, it's scary to see something that doesn't look like Algol, because everyone who does mainstream programming uses Algol-like languages. Introduce lisp to anyone who knows programming since earlier, and 99% of them will have a adverse reaction to s-expressions, before…

Symbolic expression is one thing, I would personally find it rather cool to have more first class expression as building block everywhere. However I'm not found of using explicit parentheses all around. Even mandatory curly/square brackets are superfluous with a properly defined syntax ruleset.

Re: CSS now has an if() conditional function

#242
post #61
post #42

Give it enough time, every declarative language becomes a programming language. This is happening with all config files, markup languages, data formats. The distinction between code, config and data is being erased. Everything is a soup now. Data is application, configuration is code. Code is an intermediate, volatile thing that is generated on the fly and executed in the temporary lambda containers.

This is so true, I have seen it happen with so many projects. It always starts with a cute declarative DSL, and inevitably imperative / flow control structures emerge, at which point you wonder why they didn't use a real programming language in the first place and save you the hassle or learning a half baked imperative DSL. - Puppet - CMake - Terraform - ... All these started with pure declarative DSL then incrementa…

One reason I still love Ruby so much. It gives ability to easily define a DSL within a larger robust fully fledged language, and you can always tap on the larger ecosystem if needs evolve. This is a sharp contrast with starting something small from scratch (which might seems fine at the start), and later be on your own to scale things up as needs grow.

Re: CSS now has an if() conditional function

#243
post #239

Earlier quoted context omitted.

>On the contrary, a lot of the reason CSS is confusing is because it's full of insane hacks people have to do to get the behaviour they want. CSS is confusing because the vast majority of web developers never learned it properly. Many developers won't learn any "new" CSS (like CSS Grid which shipped in all browsers in 2017 ) beyond the hacks they learned in the '90s and early 2000's. That's not the fault of CSS.

> CSS is confusing because the vast majority of web developers never learned it properly. Many developers won't learn any "new" CSS (like CSS Grid which shipped in all browsers in 2017) beyond the hacks they learned in the '90s and early 2000's. Disagree. The newer stuff is, if anything, more confusing. The old stuff, awful as it was, at least had a consistent model.

> Disagree. The newer stuff is, if anything, more confusing. The old stuff, awful as it was, at least had a consistent model.

With the "old stuff", we didn't a layout model or an alignment model. Everything required float and positioning hacks to do things they weren't designed to do. There's no logical way that was "better."

There were several different grid systems, all mostly incompatible with each other, which were required to do anything interesting.

Many layouts that are common today were impossible to do with just HTML & CSS back in '90s and 2000's.

Capabilities that almost all developers had to reach for a framework Bootstrap or Foundation for are built-in to CSS today. Or lots of JavaScript.

Re: CSS now has an if() conditional function

#244
post #39
post #7

Not supported in Firefox and Safari. Also it seems most people forget that the more bloated the web platform is, the more resources are needed to develop and maintain a web browser engine.. Chromium is open-source, but it's already expensive to maintain a fork or even rebuild it..

They just need to start deprecating and removing old features. They had no issues with XSLT removal even when some major sites like the library of congress used it. So the excuse of backward compatability has already proven to be a lie.

> They just need to start deprecating and removing old features.

That's not going to happen.

They can't break millions of websites by removing old features. Besides, for the most part, current developers can ignore most of the old stuff.

But a site made in 1997 has to render on current browsers.

Re: CSS now has an if() conditional function

#245
post #130
post #9

If we could do it over, knowing that we'd eventually get to this point, would https://en.wikipedia.org/wiki/JavaScript_Style_Sheets have been the better path?

Knowing what we know, we would probably have stepped out of our time machine to make sure that Brendan Eich kept the Scheme-based syntax and added semantic HTML enrichment for styling, sparing untold grief over the last generation...

I don't know what "semantic HTML enrichment" means, but there wasn't time. The alternative was VBScript and DHTML. DHTML and Netscape's DOM forked Web content based on `if (document.all) /* IE code here */; else /* netscape code here */`, and only with Firefox, Opera, and Safari founding whatwg.org and start HTML5 did we unify everything.
Post reply on HN