タイポグラフィ
メンション
文中で人やチーム、項目を指し示します。
このページの内容
メンションは、@Adaや#design、Issue番号のように、文中で人やチーム、項目を指し示します。本文と同じ書体と文字色を使い、ウェイトはコントロールと揃え、文字色を薄く敷きます。輪郭がないため、インラインコードと見分けられます。
メンション
<div class="flex flex-col max-w(440) mx-auto"> <div class="message"> <div class="message-bubble"> <a class="mention" href="#">@Ada Lovelace</a> the build for <a class="mention" href="#">#412</a> is green. Can <a class="mention mention-self" href="#">@you</a> review it before <span class="mention">Friday</span>? </div> </div> <div class="message message-sent"> <div class="message-bubble"> On it. I will loop in <a class="mention" href="#">@design</a> for the corners. </div> </div></div><div className="flex flex-col max-w(440) mx-auto"> <div className="message"> <div className="message-bubble"> <a className="mention" href="#">@Ada Lovelace</a> the build for <a className="mention" href="#">#412</a> is green. Can <a className="mention mention-self" href="#">@you</a> review it before <span className="mention">Friday</span>? </div> </div> <div className="message message-sent"> <div className="message-bubble"> On it. I will loop in <a className="mention" href="#">@design</a> for the corners. </div> </div></div><div class="flex flex-col max-w(440) mx-auto"> <div class="message"> <div class="message-bubble"> <a class="mention" href="#">@Ada Lovelace</a> the build for <a class="mention" href="#">#412</a> is green. Can <a class="mention mention-self" href="#">@you</a> review it before <span class="mention">Friday</span>? </div> </div> <div class="message message-sent"> <div class="message-bubble"> On it. I will loop in <a class="mention" href="#">@design</a> for the corners. </div> </div></div><template> <div class="flex flex-col max-w(440) mx-auto"> <div class="message"> <div class="message-bubble"> <a class="mention" href="#">@Ada Lovelace</a> the build for <a class="mention" href="#">#412</a> is green. Can <a class="mention mention-self" href="#">@you</a> review it before <span class="mention">Friday</span>? </div> </div> <div class="message message-sent"> <div class="message-bubble"> On it. I will loop in <a class="mention" href="#">@design</a> for the corners. </div> </div> </div></template>#リンクとテキスト
<a>でマークアップすると、プロフィールやIssueなどへのリンクになり、ホバー時には背景色が濃くなります。<span>でマークアップすると、パーサーが認識した日付などを、文中で区別して表示できます。スタイルシートは:any-linkで両者を区別し、移動先のあるメンションだけがリンクに見えるようにします。
#読者自身へのメンション
mention-selfは読者自身へのメンションを示します。背景色を少し濃くし、細い輪郭線を付けることで、長いスレッドでも自分の名前を見つけやすくします。文字色はほかのメンションと共通で、色調の差は控えめにしているため、本文には「あなた」や名前を明記します。
#文中での表示
メンションの途中では改行しません。背景色と細い輪郭線の色は現在の文字色をもとに作るため、周囲の文が読めるところならメンションも読みやすく表示されます。たとえば、本文の文字色を背景に使う送信メッセージでは、吹き出し内の明るい文字色で名前を表示し、その文字色を背景に薄く敷きます。
#アクセシビリティ
- 記号もテキストの一部です。コピーや読み上げでも同じメンションになるよう、要素内に
@または#を記述します。 - プロフィールを開くメンションはリンクです。追加のロールは不要です。
#クラス
| クラス | 説明 |
|---|---|
mention | 名前には本文と同じ書体と文字色を使い、フォントの太さはコントロールに合わせます。背景には文字色を淡く重ねます。名前の途中では改行されず、リンクの場合はポインターを重ねると背景色が濃くなります。 |
mention-self | 読み手本人の名前。やや濃い色合いと極細の罫線で示します。mention と併用します |
#関連項目
- 出典参照文中で出典を示す、小さな番号付きマーカー。
- コード文字列をそのまま等幅フォントで表示します。インラインとブロックに対応します。
- メッセージ会話の一つひとつの発言を、発言者を指す吹き出しで表示します。