1.概要
以下は、レンダリングする為の
一連の提案の中で、
CSSの displayプロパティ を
用いて行われる部分の
一覧です。
ここでの提案は、ユーザーエージェントに対してのものであり、必ずしもユーザーエージェントが採用しているとは限りません。
CSSの displayinline
です。
[ユーザーエージェント:元の文書(ソースドキュメント)を、利用者(ユーザー)に代わって解釈するもの(エージェント)。ブラウザなどの HTML文書を見る為の道具(ツール, アプリ)の事。]
2.隠された要素
隠された要素に対しての
レンダリングの提案です。
隠された要素に対してのレンダリングの提案です。display:none;
は、要素を内容も含めて無いものと扱うという事です。つまり、ボックスを生成しないという事です。
(もしくは、0個のボックスを生成するという言い方で、「ビジュアル
area, base, basefont, datalist, head, link, meta, noembed, noframes, param, rp, script, style, template, title {
display: none;
}
[hidden]:not([hidden=until-found i]):not(embed) {
display: none;
}
[hidden=until-found i]:not(embed) {
content-visibility: hidden;
}
embed[hidden] {
display: inline;
height: 0;
width: 0;
}
input[type=hidden i] {
display: none !important;
}
@media (scripting) {
noscript {
display: none !important;
}
}
Last Check 2025-03-19
<div>サンプル1</div>
<div hidden>サンプル2</div>
<div>サンプル3</div>
[hidden]
とは、hidden[...]
は、属性
<div>サンプル1</div>
<template>サンプル2</template>
<div>サンプル3</div>
template
とは、templatetemplate
などの要素名は、要素型セレクタと言います。
<div>サンプル1</div>
<embed type=
"text/plain" src= "./den.txt" hidden= "true"> <div>サンプル3</div>
<embed type=
"text/plain" src= "./den.txt"> <div>サンプル5</div>
embed[hidden]
とは、embed
※ この例示では見た目の都合で、embed
<div>サンプル1</div>
<input type=
"hidden" value= "value2"> <div>サンプル3</div>
<input type=
"text" value= "value4"> <div>サンプル5</div>
input[type=hidden i]
とは、inputhidden
である要素という意味です。i
は、大文字と小文字を区別せずに比較する事を表します。
※ この例示では見た目の都合で、input
3.ページに関する要素
ページに関する要素に対しての
レンダリングの提案です。
html, body {
display: block;
}
Last Check 2025-03-19
<!DOCTYPE html>
<html lang=
"ja"> <head>
<meta charset=
"utf-8"> <title>サンプル</title>
</head>
<body>
コンテンツ
</body>
</html>
html
※ bodydisplay: inline;
と指定した場合は、インライン
4.フローコンテンツの一部要素
フローコンテンツの
一部要素に対しての
レンダリングの提案です。
address, blockquote, center, dialog, div, figure, figcaption, footer, form, header, hr, legend, listing, main, p, plaintext, pre, search, xmp {
display: block;
}
blockquote, figure, listing, p, plaintext, pre, xmp {
margin-block: 1em;
}
blockquote, figure {
margin-inline: 40px;
}
address {
font-style: italic;
}
listing, plaintext, pre, xmp {
font-family: monospace;
white-space: pre;
}
dialog:not([open]) {
display: none;
}
dialog {
position: absolute;
inset-inline-start: 0;
inset-inline-end: 0;
width: fit-content;
height: fit-content;
margin: auto;
border: solid;
padding: 1em;
background-color: Canvas;
color: CanvasText;
}
dialog:modal {
position: fixed;
overflow: auto;
inset-block: 0;
max-width: calc(100% - 6px - 2em);
max-height: calc(100% - 6px - 2em);
}
dialog::backdrop {
background: rgba(0,0,0,0.1);
}
[popover]:not(:popover-open):not(dialog[open]) {
display: none;
}
dialog:popover-open {
display: block;
}
[popover] {
position: fixed;
inset: 0;
width: fit-content;
height: fit-content;
margin: auto;
border: solid;
padding: 0.25em;
overflow: auto;
color: CanvasText;
background-color: Canvas;
}
:popover-open::backdrop {
position: fixed;
inset: 0;
pointer-events: none !important;
background-color: transparent;
}
slot {
display: contents;
}
pre[wrap] {
white-space: pre-wrap;
}
form {
margin-block-end: 1em;
}
Last Check 2025-03-19
5.フレージングコンテンツの一部要素
フレージングコンテンツの
一部要素に対しての
レンダリングの提案です。
フレージング
注意 : displaydisplay:inline;
を改めて提案する事はありません。
cite, dfn, em, i, var {
font-style: italic;
}
b, strong {
font-weight: bolder;
}
code, kbd, samp, tt {
font-family: monospace;
}
big {
font-size: larger;
}
small {
font-size: smaller;
}
sub {
vertical-align: sub;
}
sup {
vertical-align: super;
}
sub, sup {
line-height: normal;
font-size: smaller;
}
ruby {
display: ruby;
}
rt {
display: ruby-text;
}
:link {
color: #0000EE;
}
:visited {
color: #551A8B;
}
:link:active, :visited:active {
color: #FF0000;
}
:link, :visited {
text-decoration: underline;
cursor: pointer;
}
:focus-visible {
outline: auto;
}
mark {
background: yellow;
color: black;
}
abbr[title], acronym[title] {
text-decoration: dotted underline;
}
ins, u {
text-decoration: underline;
}
del, s, strike {
text-decoration: line-through;
}
q::before {
content: open-quote;
}
q::after {
content: close-quote;
}
br {
display-outside: newline;
}
nobr {
white-space: nowrap;
}
wbr {
display-outside: break-opportunity;
}
nobr wbr {
white-space: normal;
}
br[clear=left i] {
clear: left;
}
br[clear=right i] {
clear: right;
}
br[clear=all i], br[clear=both i] {
clear: both;
}
Last Check 2025-03-19
6.セクショニングコンテンツ, ヘディングコンテンツ
セクショニングコンテンツ,
ヘディングコンテンツの
一部要素に対しての
レンダリングの提案です。
article, aside, h1, h2, h3, h4, h5, h6, hgroup, nav, section {
display: block;
}
Last Check 2025-03-19
7.一覧表(リスト)に関する一部要素
一覧表(リスト)に関する
一部要素に対しての
レンダリングの提案です。
dir, dd, dl, dt, menu, ol, ul {
display: block;
}
li {
display: list-item;
text-align: match-parent;
}
dir, dl, menu, ol, ul {
margin-block: 1em;
}
:is(dir, dl, menu, ol, ul) :is(dir, dl, menu, ol, ul) {
margin-block: 0;
}
dd {
margin-inline-start: 40px;
}
dir, menu, ol, ul {
padding-inline-start: 40px;
}
ol, ul, menu {
counter-reset: list-item;
}
ol {
list-style-type: decimal;
}
dir, menu, ul {
list-style-type: disc;
}
:is(dir, menu, ol, ul) :is(dir, menu, ul) {
list-style-type: circle;
}
:is(dir, menu, ol, ul) :is(dir, menu, ol, ul) :is(dir, menu, ul) {
list-style-type: square;
}
Last Check 2025-03-19
8.表(テーブル)に関する一部要素
表(テーブル)に関する
一部要素に対しての
レンダリングの提案です。
表(テーブル)に関する一部要素に対してのレンダリングの提案です。
table {
display: table;
}
caption {
display: table-caption;
}
colgroup, colgroup[hidden] {
display: table-column-group;
}
col, col[hidden] {
display: table-column;
}
thead, thead[hidden] {
display: table-header-group;
}
tbody, tbody[hidden] {
display: table-row-group;
}
tfoot, tfoot[hidden] {
display: table-footer-group;
}
tr, tr[hidden] {
display: table-row;
}
td, th {
display: table-cell;
}
colgroup[hidden], col[hidden], thead[hidden], tbody[hidden], tfoot[hidden], tr[hidden] {
visibility: collapse;
}
table {
box-sizing: border-box;
border-spacing: 2px;
border-collapse: separate;
text-indent: initial;
}
td, th {
padding: 1px;
}
th {
font-weight: bold;
}
caption {
text-align: center;
}
thead, tbody, tfoot, table > tr {
vertical-align: middle;
}
tr, td, th {
vertical-align: inherit;
}
thead, tbody, tfoot, tr {
border-color: inherit;
}
Last Check 2025-03-19
9.フォームに関する一部要素
フォームに関する
一部要素に対しての
レンダリングの提案です。
input, select, button, textarea {
letter-spacing: initial;
word-spacing: initial;
line-height: initial;
text-transform: initial;
text-indent: initial;
text-shadow: initial;
appearance: auto;
}
input:not([type=image i], [type=range i], [type=checkbox i], [type=radio i]) {
overflow: clip !important;
overflow-clip-margin: 0 !important;
}
input, select, textarea {
text-align: initial;
}
:autofill {
field-sizing: fixed !important;
}
input:is([type=reset i], [type=button i], [type=submit i]), button {
text-align: center;
}
input, button {
display: inline-block;
}
input[type=hidden i], input[type=file i], input[type=image i] {
appearance: none;
}
input:is([type=radio i], [type=checkbox i], [type=reset i], [type=button i], [type=submit i], [type=color i], [type=search i]), select, button {
box-sizing: border-box;
}
textarea {
white-space: pre-wrap;
}
input:not([type=image i]), textarea {
box-sizing: border-box;
}
Last Check 2025-03-19
10.一部要素
上記以外の
一部要素に対しての
レンダリングの提案です。
上記以外の一部要素に対しての、レンダリングの提案です。
fieldset {
display: block;
margin-inline: 2px;
border: groove 2px ThreeDFace;
padding-block: 0.35em 0.625em;
padding-inline: 0.75em;
min-inline-size: min-content;
}
legend {
padding-inline: 2px;
}
legend[align=left i] {
justify-self: left;
}
legend[align=center i] {
justify-self: center;
}
legend[align=right i] {
justify-self: right;
}
Last Check 2025-03-19