Re: [CSSWG] Minutes and Resolutions 2010-03-17

On 03/23/2010 09:06 AM, Brad Kemper wrote:
>
> The problem I have with this, is that what if I want my fallback to be something
> else? What if I detest using 'vertical-align:sup' because of the way it screws
> with my line spacing on the parent block, and want to use something like this instead:
>
>     sup {
>         vertical-align: baseline;
>         position:relative;
>         font-size: .8em;
>         top:-.4em;
>     }
>
> ...which, BTW, I do have something like this on a site I'm currently responsible for
> (although, IIRC, I've also got some sort of IE hack in there too, using negative
> margin or something). I realize that I could have just set the line-height to 1px
> in the SUP, but the above method also gives me greater control over the position
> of the sup when I vary its size for headlines or mice-type.
>
> I think if you are going to ignore something in the presence of
> 'character-transform: superscript', it should probably be ALL of the declared
> properties in SUP. I doubt if I am the only one with rules that change the default
> properties of SUP.

No, we don't want to reset all of the rules in SUP. What if I change the color?
The display type? Add margins? Add a border? Add underlining? Etc.

For your example here, all you need to do is write this instead:

   sup {
     vertical-align: -.4em;
     font-size: .8em;
   }

Adding a character-transform rule will then reset vertical-align and font-size,
as we said, and you're all set.

~fantasai

Received on Tuesday, 23 March 2010 17:52:42 UTC