|
|
|
|
|
by tannhaeuser
1534 days ago
|
|
Thanks for lecturing me, I'm aware of all that and know the genesis myth of CSS ;) Sorry but I think you guys/gals don't get it - the question is why do we need two item-value syntaxes. Like, HTML has 'bgcolor=black' as markup attribute, and owing to SGML, the effective value for that attribute can be defaulted, inherited, and assigned in a context-dependent way. Those mechanisms aren't directly part of HTML because they don't need to be when it's understood that HTML as an SGML application can of course make use of all the authoring mechanism SGML has. But then comes CSS and defines an entirely new syntax that's almost the same (eg. "background: #000"). How is that helpful? To say it in another way: let's assume we want web pages in 3D space, and yes I know z-index and CSS parallax effect are a thing so bear with me. Following the CSS logic, we should tunnel a background depth/z coordinate via CSS-in-HTML, like <p style="background-image: url(bla); 3d-props: 'z is -100angstrom, depth-of-field is 123deg'">
where I deliberately have chosen ad-hoc characters for the item/value separator and multiple-properties separator to make the point.You know, having a common meta syntax for elements/attributes is the entire point of SGML as a text format after all ;) |
|
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,