序論
作者は、文書~treeを成していない内容を ~UAに描画させたいと求めることもある。 馴染みの例として、見出し用の番号を,明示的に~mark-upすることなく ~UAに自動的に生成させたいときが挙げられる。 ~counterと~markerが、これらの効果を達成するために利用される。 ◎ Authors sometimes want user agents to render content that does not come from the document tree. One familiar example of this is numbered headings; the author does not want to mark the numbers up explicitly, they want the user agent to generate them automatically. Counters and markers are used to achieve these effects.
h1::before { content: counter(節) ": "; }
同様に,作者は、~UAに各 図の~captionの前に単語 "図" を挿入したり, 7 個目の章の~titleの前に行l "第 7 章" を挿入したいと求めることもある。 ◎ Similarly, authors may want the user agent to insert the word "Figure" before the caption of a figure, or "Chapter 7" on a line before the seventh chapter title.
chapter { counter-increment: 章; } chapter > title::before { content: "第 " counter(章) " 章\A"; }
要素を画像~その他の~multimedia内容で置換する効果も,共通的にある。 すべての~UAがすべての~multimedia形式を~supportするわけではないので、~fallbackを供する必要もあろう。 ◎ Another common effect is replacing elements with images or other multimedia content. Since not all user agents support all multimedia formats, fallbacks may have to be provided.
/* ~UAが~supportする形式を利用して,`logo^e 要素を~siteの~logoに置換する。 ◎ Replace <logo> elements with the site’s logo, using a format supported by the UA */ logo { content: url(logo.mov), url(logo.mng), url(logo.png), none; } /* `figure^e 要素を参照先の文書に置換する — 失敗した場合, `alt^a 属性が[ 在れば その内容/無ければ要素~自身の内容 ]で置換する。 ◎ Replace <figure> elements with the referenced document, or, failing that, with either the contents of the alt attribute or the contents of the element itself if there is no alt attribute */ figure[alt] { content: attr(href url), attr(alt); } figure:not([alt]) { content: attr(href url), contents; }
値~定義
【 この節の内容は ~CSS日本語訳 共通~pageに移譲。 】
1. `content^p ~propによる内容の挿入-法と置換-法
◎名 `content@p ◎値 `normal^v | `none^v | [ `content-replacement$t | `content-list$t ] [/ [ `string$t | `counter$t ]+ ]? ◎初 `normal^v ◎適 すべての要素/`~treeに留まる疑似要素$/`~page~margin~box$ ◎ all elements, tree-abiding pseudo-elements, and page margin boxes ◎継 されない ◎百 受容しない ◎算 下の注釈文を見よ ◎順 文法に従う ◎ア 離散的 ◎表終~UAには、視覚的でないものも含め,どの媒体でもこの~propを~supportすることが期待される。 ◎ User agents are expected to support this property on all media, including non-visual ones.
`content$p ~propは、要素や疑似要素の内側に何が描画されるかを規定する: ◎ The content property dictates what is rendered inside an element or pseudo-element.
- 要素~用には、目的は 1 つだけであり,要素を次のどちらにするかを制御する ⇒# 通常通り描画する/ 画像(場合によっては要素に結付けられている何らかの “代替( `alt^en )~text” )で置換する ◎ For elements, it has only one purpose: specifying that the element renders as normal, or replacing the element with an image (and possibly some associated "alt text").
- [ 疑似要素/`~page~margin~box$ ]用には、これはもっと強力になり,要素を次のどれにするかを制御する ⇒# 全く描画しない / 画像で置換する / 任意の行内~内容(~textや画像)で置換する ◎ For pseudo-elements and margin boxes, it is more powerful. It controls whether the element renders at all, can replace the element with an image, or replace it with arbitrary inline content (text and images).
- `normal@v
- [ 要素/`~page~margin~box$ ]に対しては、これは `contents$v に算出される。 ◎ For an element or page margin box, this computes to contents.
- [ `before$pe / `after$pe ]疑似要素に対しては、これは `~noneC$v に算出される。 ◎ For ::before and ::after, this computes to none.
- `marker$pe 疑似要素に対しては、これは それ自身( `normal$v )に算出される。 ◎ For ::marker, this computes to itself (normal).
- `~noneC@v
- 要素に対しては、要素の子~内容が要素の子として描画されるのを — 要素は空であったかのように — 妨げる。 ◎ On elements, this inhibits the children of the element from being rendered as children of this element, as if the element was empty.
- 疑似要素に対しては、 `display$p が `none^v にされていたかのように疑似要素の作成を妨げる。 ◎ On pseudo-elements it inhibits the creation of the pseudo-element as if it had display: none.
- いずれにせよ、この値は,[ 要素/疑似要素 ]を`出自の要素$とする別の疑似要素を生成させなくすることはない。 ◎ In neither case does it prevent any pseudo-elements which have this element or pseudo-element as an originating element from being generated.
- `content-replacement@t
- 構文は `image$t に等しい。 ◎ Equal to: <image>
- [ 要素/疑似要素 ]を指定された `image$t で埋められる`置換d要素$にする。 通常の内容は、抑止され, `display$p が `none^v にされていたかのように~boxを生成しない。 ◎ Makes the element or pseudo-element a replaced element, filled with the specified <image>. Its normal contents are suppressed and do not generate boxes, as if they were display: none.
- `image$t は`無効な画像$を表現する場合、代わりに[ `生来な横幅$, `生来な縦幅$ ]どちらも 0 の画像を表現しているものと扱って,`透明な黒$で埋めるモノトスル。 ◎ If the <image> represents an invalid image, then it must be treated as instead representing an image with zero intrinsic width and height, filled with transparent black.
- 上の`無効な画像$の挙動は、~Chromeに見られる。 これでいいのか? もっと良い挙動を利用できる/利用するべきでは? ◎ The above invalid image behavior appears to be what Chrome is doing. Is this okay? Is there a better behavior we can/should use?
- “[ 生来な横幅, 生来な縦幅 ]どちらも 0” は,縦横比を未定義にするので、~sizingの挙動も未定義になる。 少なくとも~Chromeにおいては、明示的な[ 横幅/縦幅 ]を与えた場合,他方の寸法は 0 であり続ける。 これは CSS Images 仕様にて明示的に定義される必要があるかもしれない — 横幅, 縦幅とも 0 にされた~SVGや~rasterに対し,各~browserがこの仕方で動作するかどうかについて何らかの究明が必要である。 ◎ "Zero intrinsic width and height" gives it an undefined aspect ratio, and sizing behavior is thus... undefined. At least, if you give it an explicit width or height, the other dimension remains at zero in Chrome. This might need to be explicitly defined over in the Images spec; needs some investigation around whether browsers act this way for 0x0 SVGs and rasters.
- 注記: `置換d要素$は、通常の要素と異なる~layout規則を利用する(実質的に,~HTML `img$e 要素と等価になる)。 ◎ Note: Replaced elements use different layout rules than normal elements. (In effect, it becomes equivalent to an HTML img element.)
- 注記: `置換d要素$は[ `before$pe / `after$pe ]疑似要素を持たないので、 `content$p ~propはその内容~全体を置換する。 ◎ Note: Replaced elements do not have ::before or ::after pseudo-elements; the content property replaces their entire contents.
- `content-list@t
-
構文は次に等しい: ◎ Equal to:
[ `string$t | `contents^v | `image$t | `counter$t | `quote$t | `target$t | `leader()$t ]+
- 要素の内容を[ 指定された 1 個~以上の各~値に対応する,指定された順序による匿名~行内~boxたち ]に置換する。 通常の内容は、 `display$p が `none^v にされていたかのように抑止され,~boxを生成しなくなる。 ◎ Replaces the element’s contents with one or more anonymous inline boxes corresponding to the specified values, in the order specified. Its normal contents are suppressed and do not generate boxes, as if they were display: none.
- 各~値は、行内~levelの匿名~boxを要素の内容に供与する。 これは、 `image$t に対しては`置換d要素$になり,他に対しては~text連なりになる。 ◎ Each value contributes an inline box to the element’s contents. For <image>, this is an inline anonymous replaced element; for the others, it’s an anonymous inline run of text.
-
`image$t は`無効な画像$を表現する場合、~UAは次のいずれかを行うモノトスル: ◎ If an <image> represents an invalid image, the user agent must do one of the following:
- `image$t を “飛ばして”,それ用には何も生成しない。 ◎ "Skip" the <image>, generating nothing for it.
- `image$t に代えて画像を表示できないこと指示する何かを表示する — “壊れた画像” ~iconなど。 ◎ Display some indication that the image can’t be displayed in place of the <image>, such as a "broken image" icon.
- この仕様は,[ ~UAは,どちらの挙動を利用するモノトスルか ]は 意図的に定義しないが、~UAは,一貫して片方のみを利用するモノトスル。 ◎ This specification intentionally does not define which behavior a user agent must use, but it must use one or the other consistently.
- 注記: `content-list$t 値を成す `image$t は 1 個だけの場合、 `content-replacement$t として解釈するモノトスル。 ◎ Note: If the value of <content-list> is a single <image>, it must instead be interpreted as a <content-replacement>.
- / [ `string$t | `counter$t ]+
- 要素~用の “代替~text” を指定する。 詳細は § ~accessibilityを得るための代替~text を見よ。 省略された場合、要素には “代替~text” は無い。 ◎ Specifies the "alt text" for the element. See § 1.2 Alternative Text for Accessibility for details. If omitted, the element has no "alt text".
`contents$v ~keywordは `content$f に置換するベキか? ◎ Should the contents keyword be replaced with content()?
1.1. 生成d内容の~accessibility
生成d内容は[ 探索-可能, 選択-可能, 支援技術に可用 ]になるベキである。 発話, 生成d内容に適用される `content$p ~propは、発話~出力~用にも具現化されるモノトスル。 `CSS3-SPEECH$r ◎ Generated content should be searchable, selectable, and available to assistive technologies. The content property applies to speech and generated content must be rendered for speech output. [CSS3-SPEECH]
~CSS用の~AAMの作業を開始する。 ◎ Start work on an AAM for CSS.
1.2. ~accessibilityを得るための代替~text
視覚的な媒体~用に意図される内容は、ときには,発話~出力~その他の視覚的でない媒体~用に代替~textを必要とする。 したがって `content$p ~propは、 `content-list$t の後に,~slash ( `/^css )に続けて指定される代替~textも受容する。 そのような代替~textが供された場合、発話~出力~用には代わりにそれを利用するモノトスル。 ◎ Content intended for visual media sometimes needs alternative text for speech output or other non-visual mediums. The content property thus accepts alternative text to be specified after a slash (/) after the last <content-list>. If such alternative text is provided, it must be used for speech output instead.
これは例えば、次を作者に許容する:
- 純粋に装飾的な~textは、発話~出力においては(代替~textに空~文字列を供して)省く。
- [ 画像/~icon/~textに符号化された記号 ]にもっと読み易い代替を供する。
ここでは `content^p ~propは画像を与えるので、代替~textを供するために代替~値が要求される。 ◎ Here the content property is an image, so the alt value is required to provide alternative text.
.new::before {
content: url(./img/star.png) / "New!";
/*
あるいは、~DOMから局所的に得られる属性:
◎
or a localized attribute from the DOM:
attr("data-alt")
*/
}
疑似要素は純粋に装飾的で,その機能は他所が受持っている場合、代替~値を空~文字列に設定することで,装飾的な要素が読上げられるのを避けれる。 ここでは、~ARIA属性が “畳まれています” などと発話されることになる。 空~文字列にされた代替~値を伴わない場合、内容は “`black right-pointing pointer^en” として発話されることになる†。 ◎ If the pseudo-element is purely decorative and its function is covered elsewhere, setting alt to the empty string can avoid reading out the decorative element. Here the ARIA attribute will be spoken as "collapsed". Without the empty string alt value, the content would also be spoken as "Black right-pointing pointer".
.expandable::before { content: "\25BA" / ""; /* ►(右向き三角) ◎ a.k.a. ► */ /* すでに ~DOM内に `aria-expanded="false"^a があるので、この疑似要素は装飾的。 ◎ aria-expanded="false" already in DOM, so this pseudo-element is decorative */ }
【† “`black right-pointing pointer^en” は,~Unicodeに定義される "►" ( U+25BA )の文字~名であり、文字~名は おそらく英語~名しか正式に定義されていないので、`内容~言語$が英語でない環境でも,このとおり発話されるかもしれない。 】
2. `content-list^t による値/関数
`content-list$t 値は、[ 画像, 文字列, ~counterの値, 要素の~text値 ]も含め, 1 個以上の匿名~行内~boxで要素を埋めるために `content$p 内で利用される。 この節では、これがとり得る値を種類別にとりあげる。 ◎ The <content-list> value is used in content to fill an element with one or more anonymous inline boxes, including images, strings, the values of counters, and the text value of elements. In this section we enumerate the possibilities.
2.1. 文字列
- `string$t
- 指定された~textで埋められる匿名~行内~boxを表現する。 ◎ Represents an anonymous inline box filled with the specified text.
- 注記: 文字列~内の`空白$は、~literal~text【通常の内容~内の~text】と同じに取扱われ, `CSS-TEXT-3$r や他所による~propにより制御される。 特に,`空白$並びは縮約され得る — `content$p の値において `"First " " Second"^v のように,複数の文字列にまたがっていようが、既定では "First Second" (単語の合間に可視な~spaceは 1 個だけ)のように描画することになる。 ◎ Note: White space in the string is handled the same as in literal text, and controlled by the properties in [CSS-TEXT-3] and elsewhere. In particular, white space character can collapse, even across multiple strings, such as in content: "First " " Second";, which by default will render similar to "First Second" (with a single visible space between the two words).
2.2. 画像
- `image$t
- 指定された画像で埋められる匿名~行内 `置換d要素$を表現する。 ◎ Represents an anonymous inline replaced element filled with the specified <image>.
- `image^t 値が`無効な画像$を表現する場合、何も表現しない( “飛ばされた” かのように,行内~内容は要素に追加されない)。 ◎ If the <image> represents an invalid image, this value instead represents nothing. (No inline content is added to the element, as if this value were "skipped".)
CSS2.1 は、画像が妥当でない場合には “壊れた画像” ~iconで代用することを,明示的に~UAに許容していた。 しかしながら,これを行っている~browserは無いように見受けられる。 これは除去してもいいのでは? ◎ CSS2.1 explicitly allowed the UA to substitute a broken image icon if the image was invalid. However, no browser appears to do this. Is this removal okay?
2.3. 要素~内容
- `contents@v
-
要素の子孫を表現する。 これは、要素ごとに一回しか利用できないので(例:~pluginや~form~controlである子は重複できない)、次に従って取扱われる: ◎ The element’s descendants. Since this can only be used once per element (you can’t duplicate the children if, e.g., one is a plugin or form control), it is handled as follows:
- 要素に対し設定された場合: ◎ If set on the element:
- 常に尊守される。 これが既定になることに注意 — `content$p の初期~値 `normal$v は、要素に対しては `contents$v に算出されるので。 ◎ Always honoured. Note that this is the default, since the initial value of content is normal and normal computes to contents on an element.
- 疑似要素に対し設定された場合: ◎ If set on one of the element’s other pseudo-elements:
- 次に挙げる深さの順序で “それまでの” 疑似要素に設定されていないことを検査して ⇒# `出自の要素$, `before$pe, `after$pe ◎ Check to see that it is not set on a "previous" pseudo-element, in the following order, depth first: • the element itself • ::before • ::after
- これは 疑似要素に対しては空~文字列として挙動するベキか? ◎ Should this behave as an empty string on pseudo-elements?
- すでに利用されている場合は、何も表現しない( `~noneC$v の様に)。 実際に生成される疑似要素のみ検査される。 ◎ If it is already used, then it evaluates to nothing (like none). Only pseudo-elements that are actually generated are checked.
次の事例では: ◎ In the following case:
foo { content: normal; } /*
初期~値
◎
this is the initial value
*/
foo::after { content: contents; }
要素の `content$p ~propは `contents$v に算出されるので、 `after^pe 疑似要素の内容は無く,現れないことになる( `~noneC$v に等価)。 ◎ ...the element’s content property would compute to contents and the after pseudo element would have no contents (equivalent to none) and thus would not appear.
foo { content: none; } foo::after { content: contents; }
一方,次の例では、 `after^pe 疑似要素は `foo^e 要素の内容を包含することになる。 ◎ But in this example, the ::after pseudo-element will contain the contents of the foo element.
要素の内容を抑止して,それを疑似要素~内で利用するような利用事例があれば、歓迎する。 ◎ Use cases for suppressing the content on the element and using it in a pseudo-element would be welcome.
注記: 単独の `content$p ~prop内に `contents$v を重ねて含めても有用にならないが、構文解析-~errorにはならない。 最初~以外の出現による効果は無い — すでに利用されているので。 `marker$pe 疑似要素に利用するのも構文解析-~errorではない — `~noneC$v の様に扱われるのは、描画~段階の間に限られる。 ◎ Note: While it is useless to include contents twice in a single content property, that is not a parse error. The second occurrence simply has no effect, as it has already been used. It is also not a parse error to use it on a ::marker pseudo-element, it is only during the rendering stage that it gets treated like none.
`marker^pe 疑似要素についての言明は、ここに必要なのか? あるいは,これは この仕様の旧~versionからの旧来の~~記述なのか? ◎ Do we need the statement about marker pseudo-elements here? Or is this legacy from the old version of the spec?
2.4. 引用符s
~HTMLでは、長きにわたり, `q^e 要素が引用文を区切るために利用されている。 `quotes^p ~propは、 `content$p ~propの様々な `*-quote^v 値との併用で,そのような引用文を適正に~styleするために利用できる。 ◎ HTML has long had the q element, used to delimit quotations. The quotes property, in conjunction with the various *-quote values of the content property, can be used to properly style such quotations.
2.4.1. `quotes^p ~propによる引用符sの指定-法
◎名 `quotes@p ◎値 `auto$v | `~noneQ$v | [ `string$t `string$t ]+ ◎初 `auto$v ◎適 すべての要素 ◎継 される ◎百 受容しない ◎算 指定された~keyword / 各~itemが文字列~値の~pairである~list ◎ the keyword none, the keyword auto, or a list, each item a pair of string values ◎順 文法に従う ◎ア 離散的 ◎表終~UAには、視覚的でないものも含め,どの媒体でもこの~propを~supportすることが期待される。 ◎ User agents are expected to support this property on all media, including non-visual ones.
この~propは、埋込d引用文~用の引用符を指定する — 必要な入子ng深さに応じて、いくつでも。 各種 値の意味は: ◎ This property specifies quotation marks for any number of embedded quotations. Values have the following meanings:
- `~noneQ@v
- `content$p ~propの[ `open-quote$v / `close-quote$v ]値が[ `no-open-quote$v / `no-close-quote$v ]であったかのように,引用符を生産しない。 ◎ The open-quote and close-quote values of the content property produce no quotations marks, as if they were no-open-quote and no-close-quote respectively.
- `auto@v
- `quotes$p 用の~typographic的に適切な`使用~値$は、要素や その親の`内容~言語$に基づいて,~UAにより自動的に選ばれる。 ◎ A typographically appropriate used value for quotes is automatically chosen by the UA based on the content language of the element and/or its parent.
- 注記: ~typographic的に適切な引用符についての情報は、 `CLDR$r に保守されている。 ~UAは、他の情報~源も利用できる — 特に,~typographic選好は変わり得るので。 しかしながら,改善があれば、~software~ecosystem全体の便益になるよう,~Unicodeへ提出することが奨励される。 ◎ Note: The Unicode Common Locale Data Repository [CLDR] maintains information on typographically appropriate quotation marks. UAs can use other sources of information as well, particularly as typographic preferences can vary; however it is encouraged to submit any improvements to Unicode so that the entire software ecosystem can benefit.
- [ `string$t `string$t ]+
- `content$p ~propの[ `open-quote$v / `close-quote$v ]値~用の値は、この~listを成すいずれかの(開き, 閉じ)引用符~pairからとられる。 1 個目の~pairは最外縁~levelの引用文を表現し, 2 個目の~pairは その~~子~levelの埋込みを表現する, 等々。 ~UAは、埋込み~levelに則って,適切な引用符~pairを適用するモノトスル。 ◎ Values for the open-quote and close-quote values of the content property are taken from this list of pairs of quotation marks (opening and closing). The first (leftmost) pair represents the outermost level of quotation, the second pair the first level of embedding, etc. The user agent must apply the appropriate pair of quotation marks according to the level of embedding.
2.4.2. `content^p ~propの各種 `*-quote^v 値
`quote@t = `open-quote^v | `close-quote^v | `no-open-quote^v | `no-close-quote^v
- `open-quote@v
- `close-quote@v
- これらの値は `quotes$p ~propに指定された適切な文字列に置換されることに加え( § `quotes^p ~propによる引用符sの指定-法 を見よ)、引用符s用の入子ng~levelを[ 増やす/減らす ](同順)。 ◎ These values are replaced by the appropriate string from the quotes property, and increments (decrements) the level of nesting for quotes. See § 2.4.1 Specifying quotes with the quotes property for more information.
- `no-open-quote@v
- `no-close-quote@v
- 挿入されるものは( `~noneC$v と同じく)無いが、引用符s用の入子ng~levelは[ 増やす/減らす ](同順)。 【!§ `quotes^p ~propによる引用符sの指定-法を見よ。】 ◎ Inserts nothing (as in none), but increments (decrements) the level of nesting for quotes. See § 2.4.1 Specifying quotes with the quotes property for more information.
引用符は、文書~内の適切な箇所に`content$p ~propの[ `open-quote$v / `close-quote$v ]値を通して挿入される。 各[ `open-quote^v / `close-quote^v ]の出現は、入子ng深さに基づいて, `quotes$p に指定された いずれかの文字列に置換される。 ◎ Quotation marks are inserted in appropriate places in a document with the open-quote and close-quote values of the content property. Each occurrence of open-quote or close-quote is replaced by one of the strings from the value of quotes, based on the depth of nesting.
[ `open-quote$v, `close-quote$v ]は、順に,引用符s~pairを成す[ 1 個目, 2 個目 ]の文字列を指す。 どの引用符s~pairが利用されるかは、引用符sの入子ng~level — すなわち、現在の出現より前に生成された~textにおける, `open-quote^v の出現~数から `close-quote^v の出現~数を引いた結果 %N — に依存し、深さ %N に応じて ( %N + 1 ) 個目の~pairが利用される。 深さが~pairの総数を超える場合、最後の~pairが繰返される。 ◎ open-quote refers to the first of a pair of quotes, close-quote refers to the second. Which pair of quotes is used depends on the nesting level of quotes: the number of occurrences of open-quote in all generated text before the current occurrence, minus the number of occurrences of close-quote. If the depth is 0, the first pair is used, if the depth is 1, the second pair is used, etc. If the depth is greater than the number of pairs, the last pair is repeated.
この引用符-法の深さは、~source文書や整形~構造の入子ngとは独立であることに注意。 ◎ Note that this quoting depth is independent of the nesting of the source document or the formatting structure.
注記: 引用符-の入子ngは、 ~counterの継承 の様に, `DOM$r の文脈における “平坦~化された要素~tree” 【参照】 に対し演算する。 ◎ Note: Quote nesting, like counter inheritance, operates on the “flattened element tree” in the context of the [DOM].
一部の~typographic~styleでは、引用文が何~段落かにわたる場合に,開き引用符は各~段落ごとに繰返す一方で,最後の段落のみ閉じ引用符で終端することが要求される。 ~CSSにおいては、これは “見えない” 閉じ引用符sを挿入して達成できる。 ~keyword `no-close-quote$v は、引用符-法の~levelを減らすが,引用符は挿入しない。 ◎ Some typographic styles require open quotation marks to be repeated before every paragraph of a quote spanning several paragraphs, but only the last paragraph ends with a closing quotation mark. In CSS, this can be achieved by inserting "phantom" closing quotes. The keyword no-close-quote decrements the quoting level, but does not insert a quotation mark.
次の~stylesheetは、 `blockquote^e 内の段落ごとに開き引用符を置きつつ,閉じ引用符は終端にのみ挿入する: ◎ The following style sheet puts opening quotation marks on every paragraph in a blockquote, and inserts a single closing quote at the end:
blockquote p:before { content: open-quote } blockquote p:after { content: no-close-quote } blockquote p:last-child::after { content: close-quote }
対称性を得るため, `no-open-quote$v ~keywordもあり、何も挿入しないが,引用文の深さを 1 だけ増やす。 ◎ For symmetry, there is also a no-open-quote keyword, which inserts nothing, but increments the quotation depth by one.
注記: 引用文と周囲の~textの言語が異なる場合、引用文は,それ自身の言語ではなく周囲の~textの言語の引用符で括ることが慣習とされている。 ◎ Note: If a quotation is in a different language than the surrounding text, it is customary to quote the text with the quote marks of the language of the surrounding text, not the language of the quotation itself.
例えば、~Englishの内側に~Frenchがある場合: ◎ For example, French inside English:
The device of the order of the garter is “Honi soit qui mal y pense.”
~Frenchの内側に~Englishがある場合: ◎ English inside French:
Il disait: « Il faut mettre l’action en ‹ fast forward ›. »
次の様な~stylesheetは、[ `open-quote$v / `close-quote$v ]がすべての要素~上で正しく働くことになるよう, `quotes$p ~propを設定することになる。 これらの規則は,[ ~English, ~French ]以外は包含しない文書~用であり、追加的な言語ごとに,それ用の規則が必要になる。 周囲の~textの言語に基づく引用符sを要素に設定するため、子~結合子( `>^css )を利用していることに注意: ◎ A style sheet like the following will set the quotes property so that open-quote and close-quote will work correctly on all elements. These rules are for documents that contain only English, French, or both. One rule is needed for every additional language. Note the use of the child combinator (">") to set quotes on elements based on the language of the surrounding text:
:lang(fr) > * { quotes: "\00AB\2005" "\2005\00BB" "\2039\2005" "\2005\203A" } :lang(en) > * { quotes: "\201C" "\201D" "\2018" "\2019" }
ここに示した引用符は、ほぼ誰もが打込める~escaped形で記されている。 直に打込めるなら、次の様な見かけになる: ◎ The quotation marks are shown here in a form that most people will be able to type. If you can type them directly, they will look like this:
:lang(fr) > * { quotes: "« " " »" "‹ " " ›" } :lang(en) > * { quotes: "“" "”" "‘" "’" }
例えば,次の~stylesheetを適用した場合: ◎ For example, applying the following style sheet:
/* 2 つの言語における 2 つの~level用に, 2 つの引用符s~pairを指定する。 ◎ Specify pairs of quotes for two levels in two languages */ :lang(en) > q { quotes: '"' '"' "'" "'" } :lang(no) > q { quotes: "«" "»" "’" "’" } /* `q^e 要素の内容の前, 後に引用符sを挿入する ◎ Insert quotes before and after Q element content */ q::before { content: open-quote } q::after { content: close-quote }
次の~HTML片は: ◎ to the following HTML fragment:
<html lang="en"> <head> <title>Quotes</title> </head> <body> <p><q>Quote me!</q></p> </body> </html>
次を生産することを~UAに許容する: ◎ would allow a user agent to produce:
"Quote me!"
一方で、次の~HTML片は: ◎ while this HTML fragment:
<html lang="no"> <head> <title>Quotes</title> </head> <body> <p><q>Trøndere gråter når <q>Vinsjan på kaia</q> blir deklamert.</q></p> </body> </html>
次を生産することになる: ◎ would produce:
«Trøndere gråter når ’Vinsjan på kaia’ blir deklamert.»
2.5. ~leader
~leader ( `leader^en ) — `tab leader^en / `dot leader^en と称されることもある — は、横方向の空間にまたがって内容を視覚的に接続するために利用される~patternであり、空間を埋める分に必要なだけ繰返される。 それらは、目次における~titleと~page番号の合間に最も共通的に利用される。 `leader()^v 関数は、 `content^p ~prop用の値としては,~CSS内に~leaderを作成するために利用される。 この関数は、~leader用に繰返される~patternを述べる文字列(~leader文字列)をとる。 ◎ A leader, sometimes known as a tab leader or a dot leader, is a repeating pattern used to visually connect content across horizontal spaces. They are most commonly used in tables of contents, between titles and page numbers. The leader() function, as a value for the content property, is used to create leaders in CSS. This function takes a string (the leader string), which describes the repeating pattern for the leader.
2.5.1. `leader()^v 関数
- leader( `leader-type$t )
- ~leaderを挿入する。 ◎ Inserts a leader. See the section on leaders for more information.
`leader@f = leader( `leader-type$t ) `leader-type@t = `dotted^v | `solid^v | `space^v | `string$t
3 種の~keywordは、共通的な文字列~用の略式~値である: ◎ Three keywords are shorthand values for common strings:
- `dotted@v
- `leader(".")^v に等価。 ◎ Equivalent to leader(".")
- `solid@v
- `leader("_")^v に等価。 ◎ Equivalent to leader("_")
- `space@v
- `leader(" ")^v に等価。 ◎ Equivalent to leader(" ")
- `string$t
- これを定義する必要がある。 ◎ Issue: Define this.
次の~CSS, ~HTMLが与えられた下では: ◎ This might result in:
ol.toc a::after { content: leader('.') target-counter(attr(href), page); }
<h1>Table of Contents</h1> <ol class="toc"> <li><a href="#chapter1">Loomings</a></li> <li><a href="#chapter2">The Carpet-Bag</a></li> <li><a href="#chapter3">The Spouter-Inn</a></li> </ol>
結果は、次のようになるであろう: ◎
Table of Contents 1. Loomings.....................1 2. The Carpet-Bag...............9 3. The Spouter-Inn.............13
~leaderは、より後にある内容は右寄せされる(終端に整列される)とする前提に依存するか? ◎ Do leaders depend on the assumption that the content after the leader is right-aligned (end-aligned)?
2.5.2. ~leaderの描画
[ ~leaderより前にある内容( “前~内容”), ~leader自身, ~leaderより後にある内容( “後~内容”) ]を包含する行lを考える。 ~leaderは、次の規則を順守する: ◎ Consider a line which contains the content before the leader (the “before content”), the leader, and the content after the leader (the “after content”). Leaders obey the following rules:
- ~leader文字列は、少なくとも一回は,全部的に現れるモノトスル。 ◎ The leader string must appear in full at least once.
- ~leaderは、アリな限り長くされるベキである。 ◎ The leader should be as long as possible
- ~leader内の可視な文字は、アリなときは,縦方向に互いに整列するベキである。 ◎ Visible characters in leaders should vertically align with each other when possible.
- ~leader文字列~内の改行~文字は、無視するモノトスル。 ◎ Line break characters in the leader string must be ignored.
- ~leader文字列~内の空白は通常の~CSS規則に従う。 ◎ White space in the leader string follows normal CSS rules.
- ~leaderが現れるのは前~内容と後~内容の合間に限られる。 ◎ A leader only appears between the start content and the end content.
- 前~内容と後~内容が異なる行lにある場合でも、~leaderは単独の行lにのみ現れる。 ◎ A leader only appears on a single line, even if the before content and after content are on different lines.
- ~leaderのみで行l全体を占めることはできない。 ◎ A leader can’t be the only thing on a line.
2.5.3. ~leaderの描画~用の手続き
-
%前~内容 を終端する行lに達するまで~lay-outする。 ◎ Lay out the before content, until reaching the line where the before content ends.
前前前前前前前前前前 前前前
-
~leader文字列を現在の行lの終端~辺から始端~辺に達するまでアリな限り多く描く(各~leader文字列は、 1 個~以上の~glyphからなる行内~boxを成し,~leaderはこれらの~boxが成す並びになる)。 ◎ The leader string consists of one or more glyphs, and is thus an inline box. A leader is a row of these boxes, drawn from the end edge to the start edge, where only those boxes not overlaid by the before or after content. On this line, draw the leader string, starting from the end edge, repeating as many times as possible until reaching the start edge.
前前前前前前前前前前 ・・・・・・・・・・
-
~leaderの上から %前~内容, %後~内容 を描く。 ~leader文字列~boxのうち,(それを成すある~glyphが)[ %前~内容 / %後~内容 ]に一部でも重合するものは、前~段にて描かなかったかのように隠す。 ◎ Draw the before and after content on top of the leader. If any part of the before content or after content overlaps a glyph in a leader string box, that glyph is not displayed.
前前前前前前前前前前 前前前・・・・後後後
-
前~段の結果、全部的に可視な~leader文字列が無くなる場合: ◎ If one full copy of the leader string is not visible:
前前前前前前前前前前 前前前後後後後後後後
%前~内容 の後に改行を挿入した上で、前~段をやり直す。 ◎ Insert a line break after the before content, draw the leader on the next line, and draw the after content on top, and hide any leader strings that are not fully displayed.
前前前前前前前前前前 前前前 ・・・後後後後後後後
%後~内容 【と 1 個の~leader文字列との合計】が行l~boxより幅広な場合、どうする? ◎ what to do if after content is wider than the line box?
~table~layoutにおいては、~leaderは まったく働かない。 どうやればこれを修正できる? ◎ Leaders don’t quite work in table layouts. How can we fix this?
【以下、ここに示されていた画像は,上の図式で十分なので省略する。】 ◎ Procedure for drawing leaders ◎ Procedure for drawing leaders when the content doesn’t fit on a single line
2.6. ~cross参照と各種 `target-*^f 関数
多くの文書は、内部的な参照を包含する — 例えば ⇒# 第 7 章を見よ… / 4.1 節にて… / 23 ~pageに… ◎ Many documents contain internal references: • See chapter 7 • in section 4.1 • on page 23
この種の~cross参照を自動的に作成するため、 `content^p ~prop用の新たな 3 種の値 — `target-counter$f, `target-counters$f, `target-text$f — が利用される。 それぞれ、~link先から得された情報を表示する。 ◎ Three new values for the content property are used to automatically create these types of cross-references: target-counter(), target-counters(), and target-text(). Each of these displays information obtained from the target end of a link.
`target@t = `target-counter()$t | `target-counters()$t | `target-text()$t
詳細は、以下の各~節を見よ。 ◎ See sections below for details on each of these.
2.6.1. `target-counter^f 関数
`target-counter@f = target-counter( [ `string$t | `url$t ] , `custom-ident$t , `counter-style$t? )
`target-counter$f 関数は、【~targetにされた要素の`~counter集合$内の】[ 所与の名前を伴う`最内縁$な`~counter$ ]の値を検索取得する。 引数には[ ~targetの~URL, ~counterの名前 ]が要求される。 省略可能な `counter-style^t 引数を利用すれば結果を整形できる。 ◎ The target-counter() function retrieves the value of the innermost counter with a given name. The required arguments are the url of the target and the name of the counter. An optional counter-style argument can be used to format the result.
この関数は、現在の文書~内の所在を指している素片~URLのみをとる。 [ 素片が無い/ 参照先の~IDがそこに無い/ ~URLは文書の外側を指している ]場合、~UAは~errorとして扱うモノトスル。 ◎ These functions only take a fragment URL which points to a location in the current document. If there’s no fragment, if the ID referenced isn’t there, or if the URL points to an outside document, the user agent must treat that as an error.
~errorの取扱いはどうあるベキか? ◎ what should error handling be?
今の所、構文上は局所的な参照に制約される。 ◎ restrict syntactically to local references for now.
~HTML: ◎ HTML:
…それについては、 <a href="#chapter4_sec2"></a> ~pageにて論じる。
~CSS: ◎ CSS:
a::after { content: target-counter(attr(href url), page) }
結果: ◎ Result:
…それについては、 137 ~pageにて論じる。
目次~内の~page番号は、自動的に生成できる: ◎ Page numbers in tables of contents can be generated automatically:
~HTML: ◎ HTML:
<nav> <ol> <li class="frontmatter"><a href="#pref_01">Preface</a></li> <li class="frontmatter"><a href="#intr_01">Introduction</a></li> <li class="bodymatter"><a href="#chap_01">Chapter One</a></li> </ol> </nav>
~CSS: ◎ CSS:
.frontmatter a::after { content: leader('.') target-counter(attr(href url), page, lower-roman) } .bodymatter a::after { content: leader('.') target-counter(attr(href url), page, decimal) }
結果: ◎ Result:
Preface.............vii Introduction.........xi Chapter One...........1
2.6.2. `target-counters^f 関数
この関数は、[ ~link先の【要素の`~counter集合$内の】~counterのうち,所与の名前を伴うもの ]すべての値を得た上で,それらの(入子な~counterの)値の合間に【 3 個目の引数に】所与の文字列を挿入することにより,整形する。 ◎ This functions fetches the value of all counters of a given name from the end of a link, and formats them by inserting a given string between the value of each nested counter.
`target-counters@f = target-counters( [ `string$t | `url$t ] , `custom-ident$t , `string$t , `counter-style$t? )
例を追加する。 ◎ I have not found a compelling example for target-counters() yet. ◎ found a compelling example, in CSS specs. Do something.
2.6.3. `target-text^f 関数
`target-text$f 関数は、引数に与えた~URLが指している要素の~text値を検索取得する。 省略可能な 2 個目の引数は、上の `string-set$p ~propと同じ値を利用して,どの内容が検索取得されるかを指定する。 ◎ The target-text() function retrieves the text value of the element referred to by the URL. An optional second argument specifies what content is retrieved, using the same values as the string-set property above.
`target-text@f = target-text( [ `string$t | `url$t ] , [ `content^v | `before^v | `after^v | `first-letter^v ]? )
`fantasai^en 氏から, もっと単純な構文が提案されている。 ◎ A simpler syntax has been proposed by fantasai: http://lists.w3.org/Archives/Public/www-style/2012Feb/0745.html
…それについては、<a href="#chapter_h1_1">後述する</a>。
a::after { content: "( " target-text(attr(href url)) " 章にて)" }
結果 ⇒ …それについては、後述する( Loomings 章にて)。 ◎ Result: …which will be discussed later, in the chapter entitled Loomings.
2.7. 有名~文字列
この節は、 `有名~文字列@ を導入する。 それは、~counterとは別個な名前空間に属する,~counterの~textな等価である。 有名~文字列は、~counterと同じ入子ng規則に従う†。 `string-set$p ~propは、 `content$p ~propに類似な値を受容する†† — ~counterの現在の値を抽出する値も含め。 ◎ This section introduces named strings, which are the textual equivalent of counters and which have a distinct namespace from counters. Named strings follow the same nesting rules as counters. The string-set property accepts values similar to the content property, including the extraction of the current value of counters.
【† どう入子にされるかは述べられていない。 その他、この節には多数の不備が見られる。 】【†† その値を通して,要素に`有名~文字列$をアテガう — `string-set^p の “`set^en” は、 `counter-set$p と同様に “~~集合”ではなく “~~設定” を意味する。 】
`有名~文字列$は、文書の他所から取り出した~metadataを,~headerや~footerの中へ挿入する簡便な仕方を与える。 例えば~HTMLにおいては、文書 `head^e に包含される `meta^e 要素にて,有名~文字列の値を設定できる。 これを属性~選択子と併用すれば、強力な仕組みになる: ◎ Named strings are a convenient way to pull metadata out of the document for insertion into headers and footers. In HTML, for example, META elements contained in the document HEAD can set the value of named strings. In conjunction with attribute selectors, this can be a powerful mechanism:
meta[author] { string-set: author attr(author); } head > title { string-set: title contents; } `page$at `left$ps {【!原文 @page の後のスペース抜け】 `top-center$at {【!@top】 text-align: left; vertical-align: middle; content: string(title); } } `page$at `right$ps { `top-center$at { text-align: right; vertical-align: middle; content: string(author); } }
2.7.1. `string-set^p ~prop
◎名 `string-set@p ◎値 `~noneS$v | [ `custom-ident$t `string$t+ ]# ◎初 `none^v ◎適 すべての要素 — ただし疑似要素は除く。 ◎ all elements, but not pseudo-elements ◎継 されない ◎百 受容しない ◎算 ~keyword `none^v / ~list — 各~itemは、識別子と文字列~値~listの~pair ◎ the keyword none or a list, each item an identifier paired with a list of string values ◎順 文法に従う ◎ア 離散的 ◎表終~UAには、視覚的でないものも含め,どの媒体でもこの~propを~supportすることが期待される。 ◎ User agents are expected to support this property on all media, including non-visual ones.
`string-set$p ~propは、要素の~text内容を`有名~文字列$の中へ複製する変数として機能する。 この有名~文字列の~text内容は、 `string$f 関数を利用して検索取得できる。 これらの変数は,所与の~page上で変化し得る — そのため, `string$f 関数~用の省略可能な 2 個目の値は、~page上のどの値を利用するか選ぶことを,作者に許容する。 ◎ The string-set property copies the text content of an element into a named string, which functions as a variable. The text content of this named string can be retrieved using the string() function. Since these variables may change on a given page, an optional second value for the string() function allows authors to choose which value on a page is used.
- `~noneS@v
- 要素は、どの`有名~文字列$も設定しない。 ◎ The element does not set any named strings.
- [ `custom-ident$t `string$t+ ]#
- 要素は、~list内の~commaで分離された各~itemごとに`有名~文字列$を確立する。 ◎ The element establishes one or more named strings, corresponding to each comma-separated entry in the list.
- 各~itemを成す `custom-ident$t は、`有名~文字列$の名前を与える。 それに後続する 1 個~以上の `string$t 値は、一緒に連結されて,有名~文字列の値を形成する。 【しかしながら、各種例は `string^t 以外の様々な構文も受容している( `1829$issue )】 ◎ For each entry, the <custom-ident> gives the name of the named string. It’s followed by one or more <string> values, which are concatenated together to form the value of the named string.
`string-set$p ~propは、`~style封込め$がある要素のどの子孫にも,効果を発揮しないモノトスル。 ◎ If an element has style containment, the string-set property must have no effects on descendants of that element.
次の例は `h1^e 要素の内容を捕捉する — それは、ある文書の章( `chapter^v )の名前を表現する。 ◎ The following example captures the contents of H1 elements, which represent chapter names in this hypothetical document.
h1【!H1】 { string-set: chapter `contents$v; }
`h1^e 要素に遭遇したときは、 `chapter^v 文字列は 要素の~textな内容に設定され, `chapter^v 用の以前の値は~~上書きされる。 ◎ When an H1 element is encountered, the chapter string is set to the element’s textual contents, and the previous value of chapter, if any, is overwritten.
2.7.2. `string^f 関数
`string@f = string( `custom-ident$t , [ `first^v | `start^v | `last^v | `first-except^v ]? )
`content$p ~propに対する `string$f 関数は、`有名~文字列$の値を文書へ複製するために利用される。 【原文の `content$p ~propの構文には、この関数は含められていないが。】 この関数の引数には、`有名~文字列$の名前が要求される。 有名~文字列の値は、~page上で何度も変化し得るので(文字列を【 `string-set$p により】定義している要素は複数個~現れ得る)、省略可能な 2 個目の引数が,有名~文字列のどの値を利用するベキかを指示する。 ◎ The string() function is used to copy the value of a named string to the document, via the content property. This function requires one argument, the name of the named string. Since the value of a named string may change several times on a page (as multiple elements defining the string can appear) an optional second argument indicates which value of the named string should be used.
`string$f 関数の 2 個目の引数がとり得る各~keywordの意味は: ◎ The second argument of the string() function is one of the following keywords:
- `first@v
- ~page上で最初にアテガわれた値が利用される。 ~page上にアテガわれた値が無い場合、`入口~値$が利用される。 2 個目の引数は供されていない場合、これが既定の値になる。 ◎ The value of the first assignment on the page is used. If there is no assignment on the page, the entry value is used. If no second argument is provided, this is the default value.
- `start@v
- 要素は~page上の最初の要素である場合、最初にアテガわれた値が利用される。 他の場合は`入口~値$が利用される。 `入口~値$は、`有名~文字列$がまだ現れていない【すなわち、どの要素も `string-set$p により名前の文字列を指定していない】場合には空になる。 ◎ If the element is the first element on the page, the value of the first assignment is used. Otherwise the entry value is used. The entry value may be empty if the named string hasn’t yet appeared.
- `last@v
- `有名~文字列$の`出口~値$が利用される。 ◎ The exit value of the named string is used.
- `first-except@v
- これは、 `first$v に一致する — 値がアテガわれた所では空~文字列が~page上に利用されることを除いて。 ◎ This is identical to first, except that the empty string is used on the page where the value is assigned.
- 内容~文字列~全体を~killする必要もあり得る。 これは必要とされるか? ◎ we may need to kill the entire content string. Is this necessary?
`有名~文字列$の内容~値は、要素の内容~boxが最初に作成された時点(要素の `display^p 値が `none^v の場合は作成される時点)にアテガわれる。 現在の~page用の `入口~値@ は,前~pageの`出口~値$であり【前~pageが無いならば空~文字列】、 `出口~値@ は,当の~pageの終端にて効果を発揮する`有名~文字列$である。 ◎ The content values of named strings are assigned at the point when the content box of the element is first created (or would have been created if the element’s display value is none). The entry value for a page is the assignment in effect at the end of the previous page. The exit value for a page is the assignment in effect at the end of the current page.
~CSS: ◎ CSS:
`page$at { size: 15cm 10cm; margin: 1.5cm; `top-left$at { content: "first: " string(heading, first); } `top-center$at { content: "start: " string(heading, start); } `top-right$at { content: "last: " string(heading, last); } } h2 { string-set: heading content() }
次の各図に、様々な~page上での `heading^v (見出し)[ `first^v / `start^v / `last^v ]値にアテガわれる文字列を示す。 ◎ The following figures show the first, start, and last assignments of the “heading” string on various pages.
2.7.3. `content^f 関数
`content@f = content( [ `text^v | `before^v | `after^v | `first-letter^v | `marker^v ]? )
- 引数なし
- `text@v
- 要素の文字列~値。 `content$f 内に値が指定されていない場合、 `text$v が指定されていたかのように動作する。 ◎ The string value of the element. If no value is specified in content(), it acts as if text were specified.
- `before@v
- `before$pe 疑似要素の文字列~値。 ◎ The string value of the ::before pseudo-element.
- `after@v
- `after$pe 疑似要素の文字列~値。 ◎ The string value of the ::after pseudo-element.
- `first-letter@v
- `first-letter$pe 疑似要素~用に定義されるものと同じ,要素の最初の字l。 ◎ The first letter of the element, as defined for the ::first-letter pseudo-element
- `marker@v
- `marker$pe 疑似要素の文字列~値。 ◎ The string value of the ::marker pseudo-element.
~HTML: ◎ HTML:
<h1>Loomings</h1>
~CSS: ◎ CSS:
h1::before { content: 'Chapter ' counter(chapter); } h1 { string-set: header content(before) ':' content(text); } h1::after { content: '.'; }
`有名~文字列$ `header^v の値は、 `Chapter 1: loomings^l になる。 ◎ The value of the named string “header” will be “Chapter 1: Loomings”.
~HTML: ◎ HTML:
<section title="Loomings">
~CSS: ◎ CSS:
section { string-set: header attr(title) }
`header^v 文字列の値は `Loomings^l になる。 ◎ The value of the “header” string will be “Loomings”.
3. 自動的な~counterと付番
この節にあった[ `counter-increment$p, `counter-reset$p ]~propは移動され、今や `CSS3LIST$r にて述べられる。 この仕様に戻すベキか? ◎ Now described in [CSS3LIST] ◎ Should this move back to CSS Content?
4. ~bookmark
一部の文書~形式 — とりわけ~PDF — は、~navi用の援助として `~bookmark@ の利用-を許容する。 文書~内の要素に指定された~bookmarkは、[ ~link, その~labelを成す~text, ~level値 ]の組を要素に供する。 各~bookmarkは、 3 個の~prop[ `bookmark-level$p, `bookmark-label$p, `bookmark-state$p ]からなる。 ◎ Some document formats, most notably PDF, allow the use of bookmarks as an aid to navigation. Bookmarks provide a list of links to document elements, as well as text to label the links and a level value. A bookmark has three properties: bookmark-level, bookmark-label, and bookmark-state.
利用者が~bookmarkを作動化したとき、~UAは,その参照-先を利用者の注目を引く地点へ持ってくるモノトスル — ちょうど、素片~URLにより参照-先の要素へ~navigateしたかのように。 その結果、 `target$ps 疑似類にも合致することになる【要素に id が付与されていなくとも】。 ◎ When a user activates a bookmark, the user agent must bring that reference point to the user’s attention, exactly as if navigating to that element by fragment URL. This will also trigger matching the :target pseudo-class.
【 ~~暗黙の前提として、指定された~bookmarkたちは,~UAの何らかの~UI(例:~menuや~side-bar)を通して呈示することが意図されていると見受けられるが、どこにどう呈示するかは~UAに委ねられるようだ(言及されていない)。 】
[ `bookmark-level$p / `bookmark-label$p / `bookmark-state$p ]~propは、`~style封込め$がある要素のどの子孫にも,効果を発揮しないモノトスル。 ◎ If an element has style containment, the bookmark-level, bookmark-label, and bookmark-state properties must have no effect on descendants of the element.
4.1. `bookmark-level^p
`bookmark-level$p ~propは、~bookmarkを作成するかどうか,そうならばどの~levelにするかを決定する。 この~propが無い, または値 `~noneB$v にされている場合、[ `bookmark-label$p / `bookmark-state$p ]の値に関わらず,~bookmarkは生成されるベキでない。 ◎ The bookmark-level property determines if a bookmark is created, and at what level. If this property is absent, or has value none, no bookmark should be generated, regardless of the values of bookmark-label or bookmark-state.
◎名 `bookmark-level@p ◎値 `~noneB$v | `integer$t ◎初 `none^v ◎適 すべての要素 ◎継 されない ◎百 受容しない ◎算 ~keyword `none^v / 指定された整数 ◎ the keyword none or the specified integer ◎順 文法に従う ◎ア 算出d値の型による ◎表終- `integer$t
- ~bookmarkの~levelを定義する — ~top-levelは 1 とする( 0 以下の値は妥当でない)。 ◎ defines the level of the bookmark, with the top level being 1 (negative and zero values are invalid).
- `~noneB$v
- ~bookmarkは生成されない。 ◎ no bookmark is generated.
section h1 { bookmark-level: 1; } section section h1 { bookmark-level: 2; } section section section h1 { bookmark-level: 3; }
注記: ~bookmarkは、各~levelの厳密な階層を作成する必要は無い。 【!~levelが飛び飛びになっていても/~tree構造に合致していなくともよい。】 ◎ Note: Bookmarks do not need to create a strict hierarchy of levels.
`display^p が `none^v にされた要素~用にも~bookmarkは作成されるベキか? ◎ Should a bookmark be created for elements with display: none?
4.2. `bookmark-label^p
◎名 `bookmark-label@p ◎値 `content-list$t ◎初content(`text$v)
◎適 すべての要素
◎継 されない
◎百 受容しない
◎算 指定された値
◎順 文法に従う
◎ア 離散的
◎表終
- `content-list$t
- ~bookmark~labelを成す~text内容を与える。 `content-list$t は、上の `string-set$p ~propの節に定義される。 ◎ <content-list> is defined above, in the section on the string-set property. The value of <content-list> becomes the text content of the bookmark label.
~HTML: ◎ HTML:
<h1>Loomings</h1>
~CSS: ◎ CSS:
h1 { bookmark-label: content(text); bookmark-level: 1; }
~bookmark~labelは `Loomings^l になる。 ◎ The bookmark label will be “Loomings”.
4.3. `bookmark-state^p
`bookmark-state$p ( “~bookmark状態” )は、 `open^v, `closed^v いずれかの状態をとる。 ~UAは、利用者がこれらの状態を~toggle可能にするモノトスル。 ◎ The bookmark-state may be open or closed. The user must be able to toggle the bookmark state.
◎名 `bookmark-state@p ◎値 `open^v | `closed^v ◎初 `open^v ◎適 塊~levelの要素 ◎継 されない ◎百 受容しない ◎算 指定された~keyword ◎順 文法に従う ◎ア 離散的 ◎表終- `open@v
- 後続の~bookmarkのうち[ その `bookmark-level$p が所与の~bookmarkの~levelを超える,かつ 同じ~level以下の別の~bookmarkに達するまでのもの ]のうち, `closed$v により表示されないもの以外は【!If one of subsequent bookmark…】、表示される。 ◎ Subsequent bookmarks with bookmark-level greater than the given bookmark are displayed, until reaching another bookmark of the same level or lower. If one of subsequent bookmark is closed, apply the same test to determine if its subsequent bookmarks should be displayed.
- `closed@v
- 後続の~bookmarkのうち,[ その `bookmark-level$p が所与の~bookmarkの~levelを超える,かつ 同じ~level以下の別の~bookmarkに達するまでのもの ]は、表示されない。 ◎ Subsequent bookmarks of bookmark-level greater than the given bookmark are not displayed, until reaching another bookmark of the same level or lower.
初期~bookmark状態や~bookmark状態は、~UAにより適切に更新されるか? ◎ Is the initial bookmark state, or the bookmark state updated by the UA as appropriate?
変更点
2016 年 6月 2日 作業草案 からの有意な変更点は: ◎ Significant changes since the 2 June 2016 Working Draft consist primarily of:
- `quotes$p の初期~値として `auto$v を追加した。 ◎ Adding auto as the initial value of quotes.
- 諸々の仕様~整理: 誤り, 相互参照, 手抜き過ぎな定義, 等々。 ◎ Lots of miscellaneous spec clean up: errors, cross-references, overly-loose or sloppy definitions, etc.
以前の変更点 も見よ。 ◎ See also previous changes.
謝辞
Stuart Ballard, David Baron, Bert Bos, Tantek Çelik, and James Craig provided invaluable suggestions used in this specification.