Re: [css-d] Superscript issues

2009-02-19 Thread Gene Falck
HI Joseph,

You wrote:

 Why do you use a span with a class when you already
 have the html tags for them? Can't you just tell the
 sup and sub tags to look the way you wish with
 css instead of making new classes? They are already
 there, and they seem more semantic (maybe not, kinda
 like b and i, I guess ). Is there something I'm
 missing?

At the time I set things up with span and class I was
disgusted with trying to use the sup and sub tags. No
matter what I tried, the html tags persisted in giving
me increased line heights so that my text which had
some lines without superscripts or subscripts and some
with looked pretty weird. Perhaps there is a good way
to tame the tags but I didn't find it; once I wrote
the sp and sb classed into my style sheet they worked
quite nicely and I never looked back.

-- 

Regards,

Gene Falck
gfa...@merr.com

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Superscript issues

2009-02-19 Thread Bill Brown
Gene Falck wrote:
 You wrote:
 Why do you use a span with a class when you already
 have the html tags for them? Can't you just tell the
 sup and sub tags to look the way you wish with
 css instead of making new classes? They are already
 there, and they seem more semantic (maybe not, kinda
 like b and i, I guess ). Is there something I'm
 missing?
 At the time I set things up with span and class I was
 disgusted with trying to use the sup and sub tags. No
 matter what I tried, the html tags persisted in giving
 me increased line heights so that my text which had
 some lines without superscripts or subscripts and some
 with looked pretty weird. Perhaps there is a good way
 to tame the tags but I didn't find it; once I wrote
 the sp and sb classed into my style sheet they worked
 quite nicely and I never looked back.

Actually, the argument can be and *has been* made that sup and sub 
mix presentation with style in much the same way as the aforementioned 
b and i pair (and others).

I go back and forth on this one. I don't work very frequently with 
mathematics, but I do know there is quite a bit of difference between 10 
to the 5th power (10^5) and 105. While sup and sub are given default 
styles by browsers, they *do* also have a contextual meaning not 
conveyed by a span tag. On the other hand, I can see how they could be 
problematic to style attractively.

Just thought that for once I'd toss out some ambivalence instead of 
stirring up another CSS Overlords thread. ;-)

-- 
!--
  ! Bill Brown macnim...@gmail.com
  ! Web Developologist, WebDevelopedia.com
--
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


[css-d] Superscript issues

2009-02-18 Thread Ron Koster
Just to change the subject...

At 05:12 PM 2/18/2009 +0100, Gunlaug Sørtun wrote:
Check out what happens when those sizes meet 'minimum font size' and
other barriers across browser-land.
So, no, sorry, proportional is not guaranteed, no matter the method.

This is, in fact, *exactly* another issue I've 
been meaning to bring up here. As I mentioned a 
while ago (in my first CSS Overlords post a 
while back), I had various problems that I'd been 
trying to resolve related to line height, 
etc.  Although I had everything looking perfectly 
fine for myself (just testing in IE and Firefox), 
these were brought to me when I showed the site 
to a friend of mine (who's on Mac, using Safari) 
-- my smaller font sizes weren't smaller, and in 
particular my superscripts were showing up at 
virtually regular sizes (but bumped up from the baseline, of course).

As it turned out -- as I found out six months 
later -- the issue wasn't what I was trying 
(theoretically) to do, but rather that my friend 
had set his browser to accept only a minimum font 
size of 14pt, and so anything smaller than that just wasn't, well, smaller.

Now, I realize that there's not much I can do if 
I want some block of text to be smaller, but my 
question here is what to do about superscripts -- 
does the fact that people can set a minimum font 
size mean that we might as well throw 
superscripts out the window (at least, if we 
don't want them to end up making a mess of our 
typography)? In that regard, rest assured that 
I'm not using superscript all over the place, 
but I do like to use them in appropriate contexts, for example:

- footnotes;
- for numbers like 1st, 2nd, 3rd (where the 
latter half, er, two-thirds is superscripted);
- certain words like Ye, Dr, etc.

If I put those parts in superscript -- and if a 
person has a minimum font size (which, of course, 
is smaller than the typically quite small size of 
superscripted characters) -- then things start 
going haywire. Not only do the superscripted look 
ridiculous (because they're so big), but it also 
*forces* the line height up for that particular 
line, regardless of what I've specified as my line height to be (in %).

Is there anything that can be done about this -- 
without just throwing out superscript as an option entirely?

Ron :?

Woof?... http://www.Psymon.com
Ach, du Leni!... http://www.Riefenstahl.org
Hmm... http://www.Imaginary-Friend.ca

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Superscript issues

2009-02-18 Thread Gunlaug Sørtun
Ron Koster wrote:
 Just to change the subject...

Ok, but we're still in the same thread :-)

 - footnotes; - for numbers like 1st, 2nd, 3rd (where the latter
  half, er, two-thirds is superscripted); - certain words like Ye, 
 Dr, etc.
 
 If I put those parts in superscript -- and if a person has a minimum 
 font size (which, of course, is smaller than the typically quite 
 small size of superscripted characters) -- then things start going 
 haywire. Not only do the superscripted look ridiculous (because 
 they're so big), but it also *forces* the line height up for that 
 particular line, regardless of what I've specified as my line height 
 to be (in %).

Unit-less line-height values works best in most cases. Have you grasped
the difference?

- a 'line-height: 140%' means the line-height is calculated from
font-size of the actual element's parent - not the element itself.
You'll have to keep track of what the parent-element's font-size is to
know what your real line-height ends up as. Same for a 'line-height:
1.4em'.

- a 'line-height: 140%' means the line-height is calculated from
font-size of the actual element itself, regardless of font-sizes in its
surroundings. Nothing to keep track of.

 Is there anything that can be done about this -- without just 
 throwing out superscript as an option entirely?

You can minimize the problem but not eliminate it.

The effect superscript can have on actual line height when subjected to
'minimum font size', can be counteracted by vertical-aligning the
superscript, or subscript, at the baseline, and then offset it by
relative positioning. Since relative positioning does not affect the
actual space, only the visual, the line-height won't be affected. Make
sure the sup's line-height is smaller than that on the paragraph, so it
doesn't blow up the line in its original, non-positioned, space.

I use a different method - styles shown here...

sup {vertical-align: 0.4em; line-height: 0; font-size: 100%;
font-family: Times New roman, Georgia, serif;}
sup.small {font-size: 75%; font-weight: 200;}

...where the line-height is zero on the sup and therefore has little to
no effect on a paragraph's line-height even if the font size gets blown
up for sub.small (which is the real superscript).

Note that I'm also using a first-choice for font-family - Times New
roman - that is visually smaller than the one I use for regular text in
the paragraph - Georgia. This helps make the sup appear smaller in most
cases, even if everything is blown up to above the paragraph's own
font-size.

Haven't encountered any serious blown-up lines or misalignments with
this method so far.


Typography on the web is full of tricks and compromises like the
above, and with a little fine-tuning, and testing of what actually works
and looks ok, the results are not too bad even under stress.

In time we may be able to upload fonts and do other things to improve
the illusions, but existing browsers will still need solutions that work
- somewhat - for years to come.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Superscript issues

2009-02-18 Thread Gene Falck
Hi Ron,

You wrote:

 ... but my question here is what to do about
 superscripts -- does the fact that people can
 set a minimum font size mean that we might as
 well throw superscripts out the window (at
 least, if we don't want them to end up making
 a mess of our typography)? ...

IMO, not entirely. I use super- and subscripts
in some of my local files that I use at home
(on Firefox) and at work (on IE) and was never
quite happy with the appearance of the sub and
sup markup results as it seemed to always throw
my line heights off. I finally gave up and now
I use a span with class=sb or class=sp and
style the classes with my choice of font size
and with positioning to bump the items down and
up as needed. I also style the line height of
the block element involved with enough room for
the repositioned items; I then have enough room
for the sub- and superscripts and get uniform
results up and down the page. Of course I have
had no problems with font size using just the
two computers.

I recommend you style a span class for your
superscripts (You can set your font size and
position the superscript however you feel is
best), style an appropriate line height for the
block elements in which you use the superscripts,
and just let those who must (or feel they must)
set their own minimum font size do whatever they
want to do to louse up their reading.

-- 

Regards,

Gene Falck
gfa...@merr.com

__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] Superscript issues

2009-02-18 Thread Joseph Sims
 I use a span with class=sb or class=sp and

 style the classes with my choice of font size
 and with positioning to bump the items down and
 up as needed. I also style the line height of
 the block element involved with enough room for
 the repositioned items; I then have enough room
 for the sub- and superscripts and get uniform
 results up and down the page. Of course I have
 had no problems with font size using just the
 two computers.
 
 I recommend you style a span class for your
 superscripts (You can set your font size and
 position the superscript however you feel is
 best), style an appropriate line height for the
 block elements in which you use the superscripts,
 and just let those who must (or feel they must)
 set their own minimum font size do whatever they
 want to do to louse up their reading.


Why do you use a span with a class when you already have the html tags for 
them? Can't you just tell the sup and sub tags to look the way you wish 
with css instead of making new classes? They are already there, and they seem 
more semantic (maybe not, kinda like b and i, I guess ). Is there something 
I'm missing?

~Joseph



  
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/