Re: Line spacing not working



On 2009-10-31, Jukka K. Korpela <jkorpela@xxxxxxxxx> wrote:
Ben C wrote:

We're in a wrong group...

I've set the Followup.

Overruled. That's not the way to move a discussion. The correct way would
have been to post to both groups, with adequate paraphrasis of preceding
discussion, and checking whether the Subject line corresponds to the actual
topic.

Well, you're the boss.

[...]
Korpela> The initial values are just rock bottom defaults, and you
Korpela> cannot actually see whether a browser "does" them, since a
Korpela> browser may apply a browser style sheet without telling what it
Korpela> is.

In theory yes. But testing the effect of each property on <span>
should reveal the initial values, since it would be absurd if the
browser default stylesheet set any styles on span.

Well, this is marginally related to HTML, so I'll comment on that side. It
is true that SPAN is defined as inline markup with no special features,
often said to be semantically empty, with the justification that no
semantics (logical meaning or even visual effect) is assigned to it in HTML
specifications. However, it would not be absurd to have a browser stylesheet
with a selector of the form SPAN.FOO, based on "microformat" ideas
(assigning "agreed" meanings to class names - not my piece of cake, but the
idea is just wrong, not absurd).

OK but you wouldn't set a class of FOO if you were trying to see what
initial values were.

More importantly, testing the effects of properties on SPAN reveals you
nothing about initial values. If you set a property for it, you override any
initial value.

This reveals you know nothing about testing. If I tried each of the
possible values of display on a SPAN, in a range of different contexts
(ideally all consisting of different configurations of variously styled
SPANs), and compared the results with not setting display on the SPAN at
all, then I would be able to get a pretty good idea which one the
browser was "doing" for the initial value.

What you can do is to view a document with SPAN elements and
looking at their appearance to see any effects of possible browser style
sheet effects on it, and most probably you won't see any.

You can tell that a span is display: inline very easily. You can also
tell that a span is float: none by putting one in the middle of a
paragraph of text and observing that it doesn't move to one side. You
can tell your span is table-layout: auto by setting it to display:
table, and filling it with a whole subtree of spans set to appropriate
table display types, widths, and with particular content in them, and
so on and so on.

Most importantly, SPAN is uninteresting in this respect. Think about H1.
Looking at a document containing an H1 element, with no author style sheet,
you will see a browser's default in a particular situation (browser
settings, display device, phase of the moon, etc.). The HTML specifications
strongly suggest that you should then see quite noticeable effects. But how
would you see whether the browser correctly implements the _initial_ values
for properties?

By testing them on SPAN not on H1 of course!

H1 is a very bad element to choose if you are trying to test initial
values, because, as you say, you would expect it to pick up quite a few
default styles.

Provided you make the assumption that SPAN gets nothing from the default
stylesheet, which is reasonable, then you can test fairly well both what
values the browser is picking as initial values for each property and
whether it is rendering correctly according to the specifications of
those values.

But don't use H1!

What you see is the effect of applying a browser stylesheet
that overrides any initial values defined in CSS specifications.

The only one I can think of is br:before {
content: "\A"; white-space: pre-line } since it doesn't appear to
quite achieve the HTML specification of BR (that it should behave like
U+2028).

You're wrong. The BR semantics is forced line break, not the use of a
particular control character,

OK, so why does the CSS spec suggest implementing it with U+000A, which,
insofar as control characters have semantics, has the wrong semantics?

I'm not saying this is strictly wrong-- there are interpretations under
which it is OK-- but it seems to me an oddity in the default stylesheet.

You said there were others (I forget your exact words), but we're still
waiting to hear what they are.
.



Relevant Pages

  • Re: Line spacing not working
    ... I know what the defined initial values are, and I know that it is impossible to study their implementation in browsers by external observations, i.e. without using browser source code or equivalent. ... possible values of display on a SPAN, ... By setting a display value, you override the initial value and the browser default value. ... The question was whether you can test whether a browser implements the defined initial values correctly, and the correct answer is that you cannot, since everything you see has at least the browser default style sheet applied on top of the effects of initial value settings. ...
    (comp.infosystems.www.authoring.html)
  • Re: Line spacing not working
    ... i.e. without using browser source code or equivalent. ... possible values of display on a SPAN, ... in the absence of any author style sheet. ...
    (comp.infosystems.www.authoring.html)
  • Re: Line spacing not working
    ... There was reason to add to the confusion by just setting followups, thery causing messages pop up out of blue sky in a style sheet group, with Subject "Line spacing not working" and the discussion revolving around something completely different. ... actually see whether a browser "does" them, ... It is true that SPAN is defined as inline markup with no special features, often said to be semantically empty, with the justification that no semantics is assigned to it in HTML specifications. ...
    (comp.infosystems.www.authoring.html)
  • Label Web Control Style Properties <Span>
    ... I use .net Label web control in my web app., which will generate <Span> tag ... WITH style attributes on client side browser. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Styling a range of HTML headings inside TD
    ... blocks and inlines, but whether something's block or inline in this ... The initial value of the `display' property and several other ... properties depends on the layout engine, and at least in the case of HTML ... A SPAN is just display: block if some stylesheet somewhere sets it ...
    (comp.infosystems.www.authoring.stylesheets)