Unitless CSS Lengths: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
 
m (Reverted edit of Sfduvos, changed back to last version by Jonathan Watt)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Issues:
From www-svg@w3.org:
http://lists.w3.org/Archives/Public/www-svg/2005Feb/0099
http://lists.w3.org/Archives/Public/www-svg/2005May/0218
http://lists.w3.org/Archives/Public/www-svg/2005Sep/0032
http://lists.w3.org/Archives/Public/www-svg/2005Sep/0033
http://lists.w3.org/Archives/Public/www-svg/2005Sep/0034
http://lists.w3.org/Archives/Public/www-svg/2005Sep/0035
http://lists.w3.org/Archives/Public/www-svg/2005Nov/0090
From www-style@w3.org:
http://lists.w3.org/Archives/Public/www-style/2005Jul/0226 (see last sentence)
http://lists.w3.org/Archives/Public/www-style/2005Jul/0289
http://lists.w3.org/Archives/Public/www-style/2005Jul/0292
http://lists.w3.org/Archives/Public/www-style/2005Jul/0293
http://lists.w3.org/Archives/Public/www-style/2005Oct/0154
Lengths must have units in CSS; without units some properties in CSS
are ambiguous (e.g. 'font', 'line-height'). Unitless lengths are in
fact not catered for by the CSS core syntax; implementations are
unable to implement both SVG and CSS in the same cascade (as required
by multi-namespace documents).
Properties that may be given a <length> value in CSS 2 are:
Properties that may be given a <length> value in CSS 2 are:


Line 13: Line 37:
     <td>[http://www.w3.org/TR/CSS2/visuren.html#propdef-bottom bottom]</td>
     <td>[http://www.w3.org/TR/CSS2/visuren.html#propdef-bottom bottom]</td>
     <td><length> | <percentage> | auto | inherit</td>
     <td><length> | <percentage> | auto | inherit</td>
  </tr>
  <tr>
    <td>[http://www.w3.org/TR/CSS2/fonts.html#propdef-font font]</td>
    <td>[ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit</td>
   </tr>
   </tr>
   <tr>
   <tr>

Latest revision as of 15:22, 25 November 2006

Issues:

From www-svg@w3.org: http://lists.w3.org/Archives/Public/www-svg/2005Feb/0099 http://lists.w3.org/Archives/Public/www-svg/2005May/0218 http://lists.w3.org/Archives/Public/www-svg/2005Sep/0032 http://lists.w3.org/Archives/Public/www-svg/2005Sep/0033 http://lists.w3.org/Archives/Public/www-svg/2005Sep/0034 http://lists.w3.org/Archives/Public/www-svg/2005Sep/0035 http://lists.w3.org/Archives/Public/www-svg/2005Nov/0090

From www-style@w3.org: http://lists.w3.org/Archives/Public/www-style/2005Jul/0226 (see last sentence) http://lists.w3.org/Archives/Public/www-style/2005Jul/0289 http://lists.w3.org/Archives/Public/www-style/2005Jul/0292 http://lists.w3.org/Archives/Public/www-style/2005Jul/0293 http://lists.w3.org/Archives/Public/www-style/2005Oct/0154

Lengths must have units in CSS; without units some properties in CSS are ambiguous (e.g. 'font', 'line-height'). Unitless lengths are in fact not catered for by the CSS core syntax; implementations are unable to implement both SVG and CSS in the same cascade (as required by multi-namespace documents).

Properties that may be given a <length> value in CSS 2 are:

background-position [ [<percentage> | <length> ]{1,2} | [ [top | center | bottom] || [left | center | right] ] ] | inherit
border-spacing <length> <length>? | inherit
bottom <length> | <percentage> | auto | inherit
font [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
font-size <absolute-size> | <relative-size> | <length> | <percentage> | inherit
height <length> | <percentage> | auto | inherit
left <length> | <percentage> | auto | inherit
letter-spacing normal | <length> | inherit
line-height normal | <number> | <length> | <percentage> | inherit
marker-offset <length> | auto | inherit
max-height <length> | <percentage> | none | inherit
max-width <length> | <percentage> | none | inherit
min-height <length> | <percentage> | inherit
min-width <length> | <percentage> | inherit
right <length> | <percentage> | auto | inherit
size <length>{1,2} | auto | portrait | landscape | inherit
text-indent <length> | <percentage> | inherit
text-shadow none | [<color> || <length> <length> <length>? ,]* [<color> || <length> <length> <length>?] | inherit
top <length> | <percentage> | auto | inherit
vertical-align baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit
width <length> | <percentage> | auto | inherit
word-spacing normal | <length> | inherit