<length>
(CSS)#✎12px
みたいに。例えば http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/galleryimg.asp に例があります。<length>
としている場合は、 CSS の <length>
に加えて <percentage> (単位 %
の値) が使えることもあります。詳しくは属性の説明を参照。em | M 幅 (全角1文字) | [CSS], [4052] |
en | N 幅 (半角1文字) | [4052] |
ex | x 高さ (≒ N幅) | [CSS] |
px | 画素単位 | [CSS], [4052] |
字 | 漢字1文字幅 | [4052] |
行 | 行幅及び行間 | [4052] |
行幅 | 行幅 | [4052] |
barleycorn | (2pi) | |
in | 吋 | [CSS] |
cm | 糎 | [CSS], [4052] |
m | 米 | |
mm | 粍 | [CSS], [4052] |
pc | パイカ | [CSS] |
pi | (1/6吋) | |
jpt | ポイント (日本) | [4052] |
pt | ポイント (DTP) | [CSS], [4052] |
q | 級 | [4052] |
em
, ex
, %
で表されている場合 → 算出値はその相対のもととなる値の単位に直したものです。length
(MathML)#✎[4054] MathML における length
は、サイズ、
間隔取り等々に用いる長さを表すものです
>>4053。
[4055] length
は、次の3種類のいずれかです >>4053。
[4069] 明記はされていませんが、明記されていないということは大文字・小文字を区別するようです。
number
の後に unit
#✎[4059] number
の後に unit
を指定すると、その単位での長さを表します。
両者の間に間隔を挟むべきではありません >>4053。
[4060] unit
として使用できるものは次の単位です。これらは CSS
に由来しています。 >>4053
em | em |
ex | ex |
px | 現在ディスプレイにおける画素数 |
in | インチ (1in = 2.54cm) |
cm | センチメートル |
mm | ミリメートル |
pt | ポイント (72pt = 1in) |
pc | パイカ (1pc = 12pt) |
% | 既定値の百分率 |
[4067] px
や cm
のような絶対単位よりも
em
や ex
のような相対単位の方が一般的には好ましいとされています。
>>4053
namedspace
#✎[4064] namedspace
を使うと間隔の名前によって長さを指定することができます。
[4065] 認められている値と、その表す既定値として推奨されている値は次の通りです。 ただし実際の値は実装規定とされています。 >>4053
veryverythinmathspace | 1/18em |
verythinmathspace | 2/18em |
thinmathspace | 3/18em |
mediummathspace | 4/18em |
thickmathspace | 5/18em |
verythickmathspace | 6/18em |
veryverythickmathspace | 7/18em |
negativeveryverythinmathspace | -1/18em |
negativeverythinmathspace | -2/18em |
negativethinmathspace | -3/18em |
negativemediummathspace | -4/18em |
negativethickmathspace | -5/18em |
negativeverythickmathspace | -6/18em |
negativeveryverythickmathspace | -7/18em |
number
#✎[4062] 単位なしで number
だけを指定すると、既定値に対する倍数を表します。
この形式は後方互換性のためのものであり、避けるべきです。
>>4053
[4063] 場合によっては属性値の認められる範囲が制限されていることがあり、 実装は最も近い認められる値に切上げ、切捨てして構いません。 >>4053
[4066] 視覚媒体においては、
表示文脈が表示上の特性情報を保有しており、
これをレンダリング・エージェントに提供します。 length
の解釈はそれによって定まります。
具体的には、
px
はディスプレイの画素と一定の対応関係を持っています。cm
等はディスプレイの解像度によって px
との関係が決まります。em
や ex
、ひいては namedspace
は現在フォント・サイズによって決まります。 >>4053[4068] 非視覚媒体で長さがレンダリングに反映されるか、 されるとしたらどう反映されるのかは実装規定です。 >>4053
[4070] Basic Data Types and Interfaces – SVG 1.1 (Second Edition) ( ( 版)) http://www.w3.org/TR/2011/REC-SVG11-20110816/types.html#DataTypeLength
[4075] IRC logs: freenode / #whatwg / 20121017 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20121017
[4076] Chrome では媒体機能の 'width'
などで <length>
が求められているところ、単位なしの数値を指定できるようです。 Firefox では構文エラーになります。
[4077] Fix https://www.w3.org/Bugs/Public/show_bug.cgi?id=27170. Define a "n... · cdfbd7f · heycam/webidl ( ( 版)) https://github.com/heycam/webidl/commit/cdfbd7f915d377f7c818c4f3e3fbb8be0a92ac37
[8] OASIS Open Document Format for Office Applications (OpenDocument) Version 1.2 - Part 1: OpenDocument Schema ( 版) http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#a18_3_18length
oslc:hintHeight String Zero-or-one Preferred height of the preview. Values are expressed using length units as specified in [CSS21].
oslc:hintWidth String Zero-or-one Preferred width of the preview. Values are expressed using length units as specified in [CSS21].
5.6.2 Servers must express the oslc:hintWidth and oslc:hintHeight properties of an oslc:Preview in length units as specified in [CSS21].
4.1.5 Servers must express the oslc:hintWidth and oslc:hintHeight properties of an oslc:Dialog in length units as specified in [CSS21].
http://open-services.net/ns/core#initialHeight
initialHeight is an RDF property.
Recommended initial height of the preview. The presence of this property indicates that the preview supports dynamically computing its size. Values must be expressed in relative length units as defined in the W3C Cascading Style Sheets Specification (CSS 2.1). Em and ex units are interpreted relative to the default system font (at 100% size).
[13] Editorial: use JavaScript string length (annevk著, ) https://github.com/whatwg/dom/commit/870ba05ed1199ce440a3f7376a0248569a6f9027
[14] Editorial: use JavaScript string length by annevk · Pull Request #538 · whatwg/dom () https://github.com/whatwg/dom/pull/538
[15] [cssom] Cleanup some serialization bits. (emilio著, ) https://github.com/w3c/csswg-drafts/commit/5cc9ddd332465b7512befe06dd650754c824645a
[16] Editorial: remove redundant requirement for existence of 'length' (Ms2ger著, ) https://github.com/heycam/webidl/commit/13e5ff2479f60328427456745dd721594fd7ee39
[17] Editorial: remove redundant requirement for existence of 'length' by Ms2ger · Pull Request #667 · heycam/webidl () https://github.com/heycam/webidl/pull/667