Hacker News new | ask | show | jobs
by mushyhammer 1534 days ago
You don’t like my “lecturing,” but you continue making preposterous statements and asking questions that can’t be answered without “lecturing.” It’s like you’re saying “why is the sky is blue when we have water?” and then correcting yourself with “but I was talking about the stars, dude. ;)”

To answer pragmatically:

- don’t use the style attribute

- you could use XLST, which is style (and more) that uses the same ML

- are you suggesting that CSS and HTML should have the same style? <a style=“color=\”red\””>? I don’t know how that’s better.

Maybe you’re still missing some lecturing: HTML is content and CSS is style. What you’re saying about 3D context would be specified in CSS, in a separate file, so your CSS-in-HTML readability argument (I guess that’s your argument? Who knows) falls pretty flat.

It’s almost the same as complaining that JS doesn’t have the same format as HTML while it totally could, but instead we have JS-in-HTML. Oh how unfair life is.

As far as I can see, you’re just trolling, so thanks for the laughs.

Signed,

    <a onclick="this.style.background='url(<svg title=\"&#x1F595;\"><rect fill=\"blue\"/></svg>)'">
1 comments

You are missing the point. Their issue is that we have two different syntaxes for specifying key-value attributes.

"are you suggesting that CSS and HTML should have the same style? <a style=“color=\”red\””>?"

Probably more like <a css-color="red"> - or alternatively: <a id=xxx> and in an css file: .xxx { href: "http..." }

I also think that you need to chill.

What you’re saying was not clear from the start, you keep moving the goalpost.

Ironically XML allowed namespaces so css:color="red" could have totally been a thing. However CSS came out to separate content from style, so doing that wouldn’t have made much sense. I wouldn’t be surprised if the style attribute was added later.

Edit: wow I was right:

> HTML 3.0 supports style sheets via the use of the LINK element [1]

> HTML 4.0 adds new hooks for style sheets, which suggest how a document is presented. The new ID, CLASS, and STYLE attributes [2]

[1]: https://www.w3.org/MarkUp/html3/intro.html

[2]: https://www2.cs.sfu.ca/~ggbaker/reference/wdghtml401/new.htm...

"you keep moving the goalpost."

This is my first post in this thread... And no, it is not moving any goalpost.

"However CSS came out to separate content from style, so doing that wouldn’t have made much sense"

The first is true, but it does not imply the second.