W3C home > Mailing lists > Public > www-style@w3.org > November 2016

Re: [css-syntax]The emperor isn't naked, but he's wearing his underpants on his head

From: Oriol Bugzilla <oriol-bugzilla@hotmail.com>
Date: Fri, 4 Nov 2016 18:49:37 +0000
To: "scratch65535@att.net" <scratch65535@att.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <VI1PR09MB00299C132A90F2D8AE96F81B97A20@VI1PR09MB0029.eurprd09.prod.outlook.com>


> everything would be what's now called an "inline" element, and
> flow with the text unless disrupted by a <br> or similar.  There
> would be no "natural" block elements, though "display:block"
> could be a way to generalise a <br>.

The initial value of the `display` property is already `inline`.
https://www.w3.org/TR/css-display-3/#the-display-properties
If some elements are blocks by default is because browsers set that
in the user agent stylesheet. And they do that because the HTML
spec says so, e.g.
https://www.w3.org/TR/html5/rendering.html#the-page
This is not related to the CSS spec. If you don't like
this, you can use `*{display:inline}`.

> attributes, unless set/cleared within the element by a style=
> or class=, would be inherited from the nearest enclosing element.
> Thus a <div> inside a <td> would inherit from the <td>, including
> those attributes inherited by the <td> from the <tr>, the <table>
> and all the way up.

This already exists. It's called inheritance.
<https://www.w3.org/TR/css-cascade-4/#inheriting>https://www.w3.org/TR/css-cascade-4/#inheritance

> If there were no enclosing element with
> attributes declared/defined, the element would inherit from its
> "genetic" ancestor, e.g.  <div> from div.

I don't understand what that genetic ancestor means. Do you mean
that a `<div>` element should only have the styles declared in a rule
set with the selector `div` if the parent element does not declare them?
Sorry but I don't think that's intuitive at all.

> All elements could inherit, and pass
> on, all attributes unless some attribute would be totally silly

Inheritance already works like this. The properties which would be silly
to inherit are called non-inherited properties.
https://www.w3.org/TR/css-cascade-4/#inherited-property

> Thus instead of "margin:auto" there would be a
> "center" attribute because any graphic designer knows what
> "center" means  while "margin:auto" is a total mystery to anyone
> who hasn't looked it up and even to some who have.

"center" it's not clear, it could be horizontal centering, vertical centering,
or both. It could be relatively to the containing block, the document,
the viewport, or whatever. It could take the element out-of-flow or not.
Centering something can mean much different things to different people.
So saying that there should be a `center` property which would simply
center is too naive in my opinion.

Maybe it's true that the current model teaches us things we could have
learned in no other way. But that's necessary if we want CSS to be able
to do complicated things.

So in general I think the CSS WG is doing a good job.
Received on Friday, 4 November 2016 18:50:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:05 UTC