W3C home > Mailing lists > Public > www-style@w3.org > July 2014

negative margin for sup/sub-scripting

From: Rafał Pietrak <rafal@ztk-rp.eu>
Date: Thu, 31 Jul 2014 11:22:00 +0200
Message-ID: <53DA0AB8.3030008@ztk-rp.eu>
To: www-style list <www-style@w3.org>
Hello the list,

Checking on sub/super-script styling, from 
(http://www.w3.org/TR/CSS2/box.html) I read: "Negative values for margin 
properties are allowed, but there may be implementation-specific limits."

Bo I tried the negative margin values, and they don't give an "expected 
results" of "collapsing" the space used up by a superscript box 
(example: http://jsfiddle.net/KxRx6/). I understand, that that's why 
people are struggling to control line height and style the 
super/sub-scripting by other means (example: 

I'm not quite sure why negative margins don't work for those cases. Was 
there any additional specs since CSS2 above (that would give authors the 
"expected disregard for box-height" in cases such as line height 
coordination when sub/super-scripting is used)? If not, could that be 
considered? To the point where a declaration like "{margin: -100%}" 
would make a box not use any space at all ... while still being 
displayed with it's ordinary height/width, and at the original position? 
Could the freedom in "implementation-speciffic limit" of CSS2, currently 
be a little more constrained with an explicitly stated implementation 
requirements like the above?

Received on Thursday, 31 July 2014 09:53:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC