HighDots Forums  

Re: Line spacing not working

alt.html alt.html


Discuss Re: Line spacing not working in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 10-30-2009 , 09:43 PM






In article <slrnhel82c.39n.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

Quote:
On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
In article <slrnheik1s.334.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
....
As with many other presentational matters, there are initial values set
by the browser via internal coding, sometimes in conjunction with user
preferences or options.

The initial values are all in the CSS specification, and the browser
_has_ to do those as printed (see the "full property table" in one of
the appendices).

The actual values set as 'normal' get to be decided, I was supposing, by
the browser via internal coding, sometimes in conjunction with user
preferences or options. Are we talking at cross purposes?

(Btw, it is hard to know which is the right group for this topic as it
is really about a number of issues that straddles HTML authoring and
CSS. Perhaps alt.html? Anyway, perhaps too late.)

A useful fiction to buy out of having to know the details of how
browsers are made and operate: A browser produces an output only with a
virtual master CSS sheet. In this sheet are all the styles down to as
exact a value as possible. This sheet can be overridden of course by
author or user sheets.

Now, to go into something, in FF, if you can, try:

<http://dorayme.netweaver.com.au/anything.html>

Open the web developer facilities and go to Edit CSS, stick in a style
on body for line-height. I have Geneva 16 set for my normal sans-serif
and if I set body {line-height: 1.36} I get about the same look as me
not setting any line-height. What do you want to say about where the
line height is being supplied from in the case? I am happy with my rich
fictitious master sheet that is very far from the minimalist:

<http://www.w3.org/TR/CSS21/sample.html>

Note how grabbing all this and making an explicit set of styles in the
head of anything.html, leaves the show virtually unchanged. Meaning
partly that this example sheet is certainly very congruent with the one
that FF actually operates with, it may even be exactly the same.

There is a menu item under Disable Styles that reads Browser Default
Styles. Tick this and see what happens to the line height. Now it is a
mingy thing! Where is this coming from? It is coming presumably from
browser coding. It looks like 'line-height: 1;' To see this, open a
couple of tabs. In one tick the Browser Default Styles, in the other
simply add under Edit CSS, body {line-height:1;}. Compare by eye.

--
dorayme

Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: Line spacing not working - 10-31-2009 , 07:17 AM






On 2009-10-31, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <slrnhel82c.39n.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
In article <slrnheik1s.334.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:

On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
...
As with many other presentational matters, there are initial values set
by the browser via internal coding, sometimes in conjunction with user
preferences or options.

The initial values are all in the CSS specification, and the browser
_has_ to do those as printed (see the "full property table" in one of
the appendices).


The actual values set as 'normal' get to be decided, I was supposing, by
the browser via internal coding, sometimes in conjunction with user
preferences or options. Are we talking at cross purposes?
A sufficiently good mental model for everyone except Korpela is that the
browser hard-wires somewhere the initial values for each property and
then loads its own default stylesheet from somewhere just like any other
stylesheet.

So if the part of the browser trying to lay out the page finds a span,
it asks itself, should this be block or inline?

Then it looks in all the stylesheets, and can't find anything matching
the span, even in its own default stylesheet. So then it says, well,
display is always inline in the absence of anything else.

Quote:
(Btw, it is hard to know which is the right group for this topic as it
is really about a number of issues that straddles HTML authoring and
CSS. Perhaps alt.html? Anyway, perhaps too late.)

A useful fiction to buy out of having to know the details of how
browsers are made and operate: A browser produces an output only with a
virtual master CSS sheet. In this sheet are all the styles down to as
exact a value as possible. This sheet can be overridden of course by
author or user sheets.
Yes, although in this "virtual master CSS sheet", all selectors are just
*. It would look this:

* display { inline }
* line-height { normal }

etc. The initial value is a property only of properties, not of elements.

I'm assuming by "virtual master CSS sheet" you don't mean the same thing
as "browser default stylesheet".

Quote:
Now, to go into something, in FF, if you can, try:

http://dorayme.netweaver.com.au/anything.html

Open the web developer facilities and go to Edit CSS, stick in a style
on body for line-height. I have Geneva 16 set for my normal sans-serif
and if I set body {line-height: 1.36} I get about the same look as me
not setting any line-height. What do you want to say about where the
line height is being supplied from in the case? I am happy with my rich
fictitious master sheet that is very far from the minimalist:

http://www.w3.org/TR/CSS21/sample.html

Note how grabbing all this and making an explicit set of styles in the
head of anything.html, leaves the show virtually unchanged. Meaning
partly that this example sheet is certainly very congruent with the one
that FF actually operates with, it may even be exactly the same.
I think it's mostly the same, yes.

Quote:
There is a menu item under Disable Styles that reads Browser Default
Styles.
I can't find that menu!

Quote:
Tick this and see what happens to the line height. Now it is a
mingy thing! Where is this coming from? It is coming presumably from
browser coding. It looks like 'line-height: 1;' To see this, open a
couple of tabs. In one tick the Browser Default Styles, in the other
simply add under Edit CSS, body {line-height:1;}. Compare by eye.
You should get line-height: normal, which is usually a bit more than 1
(but depends on the font). And I would expect that to be the same as
with browser default styles since there aren't any line-height rules in
the suggested default stylesheet, which I think is very close to what
the main browsers use. But perhaps what you have discovered is that this
is not the case.

Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 10-31-2009 , 11:52 PM



In article <slrnheo786.34o.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:
....
Quote:
On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
...
A useful fiction to buy out of having to know the details of how
browsers are made and operate: A browser produces an output only with a
virtual master CSS sheet. In this sheet are all the styles down to as
exact a value as possible. This sheet can be overridden of course by
author or user sheets.

Yes, although in this "virtual master CSS sheet", all selectors are just
*. It would look this:

* display { inline }
* line-height { normal }

etc. The initial value is a property only of properties, not of elements.

I'm assuming by "virtual master CSS sheet" you don't mean the same thing
as "browser default stylesheet".

Well, no, not just this, but I did mean to include this latter.
Basically, it is a complicated business always having to think, what is
due to some actual but hidden default style sheet (a la the appendix one
you mentioned) and what to hard wiring and what to hard-wiring-with-some
values set by user preferences. Three different things here, all
contributing to what you get when you use a browser in anger. Two or
three technical levers complicating the understanding.

JK says things about browsers setting too small a line-height. For me,
this usefully means that the fictitious master sheet of many browsers
has body {line-height: 1.2} (or thereabouts) and this is too small for
some popular fonts. So override with at least 1.3 in author sheet.
Simple enough. Try working all this out in terms of what exactly it is
in each browser that sets 1.2 when it comes brand new out of the box. No
thanks, would say the practical website designer.

I was imagining a possible useful fiction that would free the practical
web designer uninterested in actual browser wiring to have a simple
model. The idea is a modernish one in that the browser is an engine that
has no internal biases towards any sort of presentation at all. Without
the virtual master CSS sheet, it simply cannot operate. It just sulks
and does nothing like some widowers and widows do sans their partners.
You cannot turn off this master sheet because it is its way into the
world. The browser becomes a useful object in conjunction with a master
CSS sheet.

Under this idea, what are to make of the act of turning styles off?
Well, for me, you can't turn all styles off, it is too absurd a concept.
Remove all styles and you remove all meaning and usefulness. But all is
not lost, it can mean turn off all author styles. It can mean, turn off
many or all the default styles in one of the actual but hidden sheets.
But it can't under my idea mean turn off the master sheet. I was
imagining a super el basic sheet when I ticked the command that you are
not seeing in your FF.


Quote:
Now, to go into something, in FF, if you can, try:

http://dorayme.netweaver.com.au/anything.html

Open the web developer facilities and go to Edit CSS, stick in a style
on body for line-height. I have Geneva 16 set for my normal sans-serif
and if I set body {line-height: 1.36} I get about the same look as me
not setting any line-height. What do you want to say about where the
line height is being supplied from in the case? I am happy with my rich
fictitious master sheet that is very far from the minimalist:

http://www.w3.org/TR/CSS21/sample.html

Note how grabbing all this and making an explicit set of styles in the
head of anything.html, leaves the show virtually unchanged. Meaning
partly that this example sheet is certainly very congruent with the one
that FF actually operates with, it may even be exactly the same.

I think it's mostly the same, yes.

There is a menu item under Disable Styles that reads Browser Default
Styles.

I can't find that menu!

Tick this and see what happens to the line height. Now it is a
mingy thing! Where is this coming from? It is coming presumably from
browser coding. It looks like 'line-height: 1;' To see this, open a
couple of tabs. In one tick the Browser Default Styles, in the other
simply add under Edit CSS, body {line-height:1;}. Compare by eye.

You should get line-height: normal, which is usually a bit more than 1
(but depends on the font). And I would expect that to be the same as
with browser default styles since there aren't any line-height rules in
the suggested default stylesheet, which I think is very close to what
the main browsers use. But perhaps what you have discovered is that this
is not the case.
I am hard pressed to quite fathom all the conversation between you and
'the boss' <g> but I would not mind putting in my $US25's worth - OK, I
am not cheap, I have pride.

When we are testing what is 'given' by the browser as default, I feel
less confused when I think of this virtual master sheet. One can
*easily* test for what the master styles are. Just override with author
sheet in respect to a property *to see* if there is a change. If not,
you have all you need to really know for the practical website making.

Maybe under different pressures this idea is less than baked. But I go
with it for the moment.

--
dorayme

Reply With Quote
  #4  
Old   
Ben C
 
Posts: n/a

Default Re: Line spacing not working - 11-01-2009 , 07:06 AM



On 2009-11-01, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <slrnheo786.34o.spamspam (AT) bowser (DOT) marioworld>,
Ben C <spamspam (AT) spam (DOT) eggs> wrote:
...
On 2009-10-29, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:
[...]
...
A useful fiction to buy out of having to know the details of how
browsers are made and operate: A browser produces an output only with a
virtual master CSS sheet. In this sheet are all the styles down to as
exact a value as possible. This sheet can be overridden of course by
author or user sheets.

Yes, although in this "virtual master CSS sheet", all selectors are just
*. It would look this:

* display { inline }
* line-height { normal }

etc. The initial value is a property only of properties, not of elements.

I'm assuming by "virtual master CSS sheet" you don't mean the same thing
as "browser default stylesheet".


Well, no, not just this, but I did mean to include this latter.
Basically, it is a complicated business always having to think, what is
due to some actual but hidden default style sheet (a la the appendix one
you mentioned) and what to hard wiring and what to hard-wiring-with-some
values set by user preferences. Three different things here, all
contributing to what you get when you use a browser in anger. Two or
three technical levers complicating the understanding.

JK says things about browsers setting too small a line-height.
He just thinks line-height: normal is too small.

Quote:
For me, this usefully means that the fictitious master sheet of many
browsers has body {line-height: 1.2} (or thereabouts) and this is too
small for some popular fonts.
line-height isn't normally set in any sheets, so you get line-height:
normal, which is the initial value of line-height.

If you want to think of initial values as coming from a fictitious
sheet, which you can if you like, then that sheet would look something
like this:

* {line-height: normal}
* {display: inline}

etc.

Quote:
So override with at least 1.3 in author sheet. Simple enough. Try
working all this out in terms of what exactly it is in each browser
that sets 1.2 when it comes brand new out of the box. No thanks, would
say the practical website designer.
OK, but it's worth clarifying what the spec means when it talks about
"initial values".

Quote:
I was imagining a possible useful fiction that would free the practical
web designer uninterested in actual browser wiring to have a simple
model. The idea is a modernish one in that the browser is an engine that
has no internal biases towards any sort of presentation at all.
Yes, that's pretty much what a modernish browser is with only a couple
of exceptions.

Quote:
Without the virtual master CSS sheet, it simply cannot operate. It
just sulks and does nothing like some widowers and widows do sans
their partners. You cannot turn off this master sheet because it is
its way into the world. The browser becomes a useful object in
conjunction with a master CSS sheet.
To me this sounds like the master CSS sheet contains the initial values.

Quote:
Under this idea, what are to make of the act of turning styles off?
Well, for me, you can't turn all styles off, it is too absurd a concept.
In the CSS terminology, you can't turn off initial values, and it
wouldn't make sense to, so I think you are talking about the same thing.

Quote:
Remove all styles and you remove all meaning and usefulness. But all
is not lost, it can mean turn off all author styles. It can mean, turn
off many or all the default styles in one of the actual but hidden
sheets. But it can't under my idea mean turn off the master sheet. I
was imagining a super el basic sheet when I ticked the command that
you are not seeing in your FF.
As you say it can't be done. A div can be display: inline without the
default stylesheet. But without an initial value for display, it isn't
display: anything, and the browser would be totally at a loss, like your
sulking widower.

Quote:
Now, to go into something, in FF, if you can, try:

http://dorayme.netweaver.com.au/anything.html

Open the web developer facilities and go to Edit CSS, stick in a style
on body for line-height.
I didn't have the web developer facilities, but have now installed them,
and also have the Disable Styles button you mentioned.

Quote:
I have Geneva 16 set for my normal sans-serif
and if I set body {line-height: 1.36} I get about the same look as me
not setting any line-height. What do you want to say about where the
line height is being supplied from in the case?
One may conclude that line-height: normal for Geneva 16 is about 1.36x
the height of that font.

[...]
Quote:
You should get line-height: normal, which is usually a bit more than 1
(but depends on the font). And I would expect that to be the same as
with browser default styles since there aren't any line-height rules in
the suggested default stylesheet, which I think is very close to what
the main browsers use. But perhaps what you have discovered is that this
is not the case.

I am hard pressed to quite fathom all the conversation between you and
'the boss' <g> but I would not mind putting in my $US25's worth - OK, I
am not cheap, I have pride.

When we are testing what is 'given' by the browser as default, I feel
less confused when I think of this virtual master sheet. One can
*easily* test for what the master styles are. Just override with author
sheet in respect to a property *to see* if there is a change. If not,
you have all you need to really know for the practical website making.

Maybe under different pressures this idea is less than baked. But I go
with it for the moment.
All I am trying to explain is the distinction between the browser
default stylesheet and the initial values of properties.

It may seem like unnecessary entity multiplication, but it's the
terminology the spec uses, and sometimes one wants to understand the
spec.

The default stylesheet given in that Appendix also does not tell you the
whole story unless read in conjunction with the "full property table"
given in one of the other Appendices which lists initial values for each
property. This is because the default stylesheet does not set some value
of every property for every tag. It doesn't set anything at all for
span, for example. So how is the browser supposed to know that span is
display: inline, direction: ltr, and float: none, and so on? Well, you
can find those in the initial values column of the full property table.

Reply With Quote
  #5  
Old   
Jan C. Faerber
 
Posts: n/a

Default Re: Line spacing not working - 11-01-2009 , 08:51 AM



On Nov 1, 4:52*am, dorayme <doraymeRidT... (AT) optusnet (DOT) com.au> wrote:
Quote:
In article <slrnheo786.34o.spams... (AT) bowser (DOT) marioworld>,
*Ben C <spams... (AT) spam (DOT) eggs> wrote:
A sufficiently good mental model for everyone except Korpela is
that the browser hard-wires somewhere the initial values for each > > property and then loads its own default stylesheet from somewhere > > just like any other stylesheet.
JK says things about browsers setting too small a line-height.
sorry - I missed that.

Reply With Quote
  #6  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 11-02-2009 , 02:08 AM



dorayme wrote:

Quote:
If you want to think of initial values as coming from a fictitious
sheet, which you can if you like,
That's a pointless assumption, so why do you play in terms of it, instead of
expressing your ideas in CSS terms.

Quote:
My motive is to get away from
such a variable as "normal", to cash its value!
It is not a variable and it is not replaceable by any other value, within
CSS.

Quote:
In this sheet, there
would simply be

body {line-height: 1.2;}
That would correspond to a poor implementation, as in a good implementation,
the meaning of the value normal for line-height depends on the font. (This
does not make the value normal a variable. Its effect varies, but you cannot
assign a value to it etc.)

Quote:
The point of the 'useful fiction' is to not worry where values are
coming from, they are what actually confronts the website maker.
The fiction is worse than useless since it has misled you.

Quote:
The master sheet will be different for every browser but not that
different. Although you and he might not know it, when JK says words
to the effect that line-height is set too small..., this in effect
means that in most browsers, the master sheet is giving too much
below 1.3 to be comfortable with some popular fonts.
No, the bottom line is that the value normal is, on many browsers for many
fonts, too small for normal use of the font, especially when line length is
large. And by browser defaults, lines extend from the left of the browser
window to its right, with small margins.

Moreover, the line height isn't something that can be regarded as selected
by the user in the same sense as default font face and size can. Setting
default font face and size in a browser is easy, though less common than it
should be; it is normal control of a program, quite comparable to how you
set font face and size in your favorite word processor. You don't need to
understand anything about CSS or HTML for that.

Setting default line-height in a browser requires a stylesheet, and though
it can be trivial to us, it isn't trivial at all to a person who never heard
of CSS and never needed to. Moreover, any value would be a wild guess. If
you set line-height so that it suits the default font face and family you
have set (in browser settings or in a user style sheet), it will also be
applied when the font is something different. This would not create a
problem if authors always set line-height when they set font, but we know
they don't, and this discussion has contained opinions saying that they even
shouldn't!

Quote:
So override with at least 1.3 in author sheet. Simple enough. Try
working all this out in terms of what exactly it is in each browser
that sets 1.2 when it comes brand new out of the box. No thanks,
would say the practical website designer.

OK, but it's worth clarifying what the spec means when it talks about
"initial values".
No, it does not clarify that at all.

Quote:
This is an excellent point and I am not meaning to dispute it.
Well, maybe there is no point to be disputed, but the statements were
grossly misleading. They obscure rather than clarify the concept of "initial
value".

The "initial value" concept is simple enough and needs no clarification, but
it may need a motivation, a description of _why_ initial values need to be
set.

Consider an XML document, for a change. As such, it is a data structure with
some data in it, without any defined or suggested rendering. Now, if you add
a reference to a CSS style sheet in it, the picture changes. You can set
values for properties of elements as you like, but what happens to
properties that you don't set at all? Without defined initial values, you
would have to set them all - all CSS properties for all elements (though
admittedly you could use the universal selector *) - in order to have a
defined rendering. The initial values set simple, unimaginative rock-bottom
defaults for everything. Of course they are partly quite inappropriate e.g.
for headings, paragraphs, tables, etc., but it is the author's
responsibility to set the properties that are essential to rendering - but
he does not need to worry about setting _everything_.

With HTML, the picture is different, since many elements have default
renderings different from those corresponding to initial values in CSS.
Thus, what you see (when not using any author or user style sheet) is the
net effect of initial values, browser's style sheet, and browser
idiosyncracies (like rendering elements outside the scope and control of
CSS, as browser often do, and used to do even more often, with form fields.
When authoring HTML documents, you cannot rely on initial values.

Quote:
We recommend a used value for
'normal' between
1.0 to 1.2). Between indeed! It is either 1.bloody2 or not for the
practical website maker! <g
That's not practical at all. The practical, and also theoretical, situation
is that the meaning of normal varies, within one browser, depending on font,
and maybe even other factors.

The problem with a suggested range of 1.0 to 1.2 is that such values are
generally too small: 1.0 is absurd for most fonts, and even 1.2 isn't
usually sufficient for the fonts people actually use on their web pages.

Quote:
To me this sounds like the master CSS sheet contains the initial
values.

Yes, indeed, that is the idea.
No, that's not the idea at all. The idea is that the initial values exist
outside all style sheets and never participate the cascade (remember the
most misunderstood of all CSS concepts?) except in the sense that when
absolutely no style sheet assigns a value to a property of an element, the
initial value is applied.

Quote:
For example, if you wake up in the middle of the night in a bad
sweat thinking your browser makes child divs of divs inline, you can
easily test that this is not so by

div div {display: block}

and seeing if anything at all changes on the pages you might have had
in mind as examples.
And then you get shocked when you detect that a div inside a div is inline
when the outer div is inside a table. Well, it isn't, but the risk for that,
however miniscule, is surely much greater than getting simple nested divs
wrong.

This, however, has nothing to do with initial values (which you seem to be
trying to discuss).

Quote:
So what do you make of FF showing a line-height of a mere 1 times font
size when "Browser Default Style' is turned off?
Beats me. Maybe I'll take a look and give the issue some consideration. My
bet is that there's a misunderstanding. You seem to be implying that such a
setting would set all properties to their initial values. It is easy to see
that this does not happen. Headings still have large font size and margins,
<i> still causes italics, etc. Why would you thus assume that this browser
function, which has no adequate documentation published, would show the
effect of line-height: normal, especially if you think it always means "mere
1 times font size" in this browser. That would be rather abnormal
implementation of normal.

Quote:
That is the initial value, no?
No it isn't.

Quote:
I know, it is "normal" - but I am talking brass tacks, what
it comes down to.
It comes down to different things, as it should. If it comes down to the
font size, it's either an odd font or an odd browser feature.

Followups trimmed.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #7  
Old   
Ben C
 
Posts: n/a

Default Re: Line spacing not working - 11-02-2009 , 03:32 AM



On 2009-11-02, Jukka K. Korpela <jkorpela (AT) cs (DOT) tut.fi> wrote:
[...]
Quote:
The "initial value" concept is simple enough and needs no clarification, but
it may need a motivation, a description of _why_ initial values need to be
set.

Consider an XML document, for a change. As such, it is a data structure with
some data in it, without any defined or suggested rendering. Now, if you add
a reference to a CSS style sheet in it, the picture changes. You can set
values for properties of elements as you like, but what happens to
properties that you don't set at all? Without defined initial values, you
would have to set them all - all CSS properties for all elements (though
admittedly you could use the universal selector *) - in order to have a
defined rendering. The initial values set simple, unimaginative rock-bottom
defaults for everything. Of course they are partly quite inappropriate e.g.
for headings, paragraphs, tables, etc., but it is the author's
responsibility to set the properties that are essential to rendering - but
he does not need to worry about setting _everything_.
Good explanation.

Quote:
With HTML, the picture is different, since many elements have default
renderings different from those corresponding to initial values in CSS.
The pictures become much more similar again if you consider that those
default renderings are intended to be implemented with a CSS default
stylesheet. And in modern browsers, almost all of them are, or at least
they behave as if they did, so it is a good enough mental model.

Quote:
Thus, what you see (when not using any author or user style sheet) is the
net effect of initial values, browser's style sheet, and browser
idiosyncracies (like rendering elements outside the scope and control of
CSS, as browser often do, and used to do even more often, with form fields.
Correct.

Quote:
When authoring HTML documents, you cannot rely on initial values.
Also true.

Reply With Quote
  #8  
Old   
Stan Brown
 
Posts: n/a

Default Re: Line spacing not working - 11-02-2009 , 07:08 AM



Mon, 02 Nov 2009 13:41:46 +1100 from dorayme
<doraymeRidThis (AT) optusnet (DOT) com.au>:
Quote:
In this sheet, there would
simply be

body {line-height: 1.2;}

or even, I don't mind and it makes no difference anyway, other things
being equal,

* {line-height: 1.2]

The point of the 'useful fiction' is to not worry where values are
coming from, they are what actually confronts the website maker. The
master sheet will be different for every browser but not that different.
Although you and he might not know it, when JK says words to the effect
that line-height is set too small..., this in effect means that in most
browsers, the master sheet is giving too much below 1.3 to be
comfortable with some popular fonts.
Sorry, I don't understand. Given that 1.2 is too low for some
popular fonts, why set it to 1.2? I found when I had line-
height:1.2, and selected Palatino in my browser, then printed my Web
page, that the underscores under links sometimes didn't print because
they interfered with the ascenders of the following line.

Isn't "normal" better than a specific number because it lets the
browser pick a line-height based on choice of font?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you

Reply With Quote
  #9  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Line spacing not working - 11-02-2009 , 12:05 PM



Stan Brown wrote:

Quote:
Given that 1.2 is too low for some
popular fonts, why set it to 1.2?
There's no good reason to do so, except perhaps that 1.2 tends to be
somewhat larger and therefore somewhat better than common browser defaults.

The line-height should be set according to the font properties (and other
specifics of the page). This creates a problem, since it implies that in
practice you need to set the font face, more or less. Yet you need to
consider that users may override your font settings easily, so the
line-height should be tolerable for any typical font. That's rather awkward
of course.

Quote:
I found when I had line-
height:1.2, and selected Palatino in my browser, then printed my Web
page, that the underscores under links sometimes didn't print because
they interfered with the ascenders of the following line.
My system lacks a font named Palatino but it has "Palatino Linotype".
Testing it on IE 8 supports your observations: with line-height defaulted,
the rendering is OK, apparently with a fairly large line height, whereas
line-height: 1.2 makes the rendering worse, though not illegible.

Quote:
Isn't "normal" better than a specific number because it lets the
browser pick a line-height based on choice of font?
In theory it is, but in practice browsers aren't that clever at all.

Testing with Arial, probably the most common font on web pages, I see lines
too close to each other even for a short line length, when line-height is
default. Setting it to 1.2 is an improvement over the browser default, but
the optimum is somewhere near 1.4, depending on line length of course. With
Verdana, the situation is even worse.

Followups set to alt.html only.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #10  
Old   
dorayme
 
Posts: n/a

Default Re: Line spacing not working - 11-03-2009 , 05:28 AM



In article <MPG.255895c7c7c2a20a98bd06 (AT) news (DOT) individual.net>,
Stan Brown <the_stan_brown (AT) fastmail (DOT) fm> wrote:

Quote:
Mon, 02 Nov 2009 13:41:46 +1100 from dorayme
doraymeRidThis (AT) optusnet (DOT) com.au>:
In this sheet, there would
simply be

body {line-height: 1.2;}

or even, I don't mind and it makes no difference anyway, other things
being equal,

* {line-height: 1.2]

The point of the 'useful fiction' is to not worry where values are
coming from, they are what actually confronts the website maker. The
master sheet will be different for every browser but not that different.
Although you and he might not know it, when JK says words to the effect
that line-height is set too small..., this in effect means that in most
browsers, the master sheet is giving too much below 1.3 to be
comfortable with some popular fonts.

Sorry, I don't understand. Given that 1.2 is too low for some
popular fonts, why set it to 1.2? I found when I had line-
height:1.2, and selected Palatino in my browser, then printed my Web
page, that the underscores under links sometimes didn't print because
they interfered with the ascenders of the following line.

Isn't "normal" better than a specific number because it lets the
browser pick a line-height based on choice of font?
I was not meaning to recommend 1.2, it was just an instance of putting
in a line-height rule. I am not surprised by your experience. I really
do think that unless we nail this business down a bit better, it is
better not to say anything at all about line-height except for really
clear cases for elements where you really don't want any fine tuning but
maybe quite big gaps (perhaps for graphic effect). Or just be happy with
* {line-height: 1.3} as if it is a sort of min-line-height that will
never be too bad.

But really, you might have to ask JK for some practical examples of
author style sheets he thinks are good that avoid the problem of
browsers settling on too low a figure. There are too many variables in
this matter that cloud the issue to say anything practical and general.
Not much use in saying browsers are too mingy with some fonts if there
is no practical and general policy to address this inadequacy.

--
dorayme

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.