/*
 * 共通キット：旧サイトの HTML とブロックの違いを吸収する CSS。
 * 旧サイトの CSS（html:root 付き）の後に読む。
 */

/* 旧サイトで div などの中に直に置かれていた画像：画像ブロックの figure（と a）の箱を消して、img を親の中に直に置いたのと同じにする */
html:root figure.wp-block-image.ys-inline,
html:root figure.wp-block-image.ys-inline > a.ys-link {
	all: inherit;
	display: contents;
}

html:root figure.wp-block-image.ys-inline img {
	vertical-align: baseline;
}

/* 旧サイトで div などの中に直に置かれていた文字・<a>・<span>：段落の箱を消す */
html:root p.ys-wrap {
	all: inherit;
	display: contents;
}

/* 旧サイトの style="text-align: center" の置き換え */
html:root .wp-site-blocks .has-text-align-center {
	text-align: center;
}

/* エディターでの埋め込みの表示 */
.ys-site-kit-placeholder {
	padding: 16px;
	background-color: #f0f0f0;
}

/* 旧サイトの表（table だけ）：表のブロックの figure の箱を消す */
html:root figure.wp-block-table.ys-table {
	all: inherit;
	display: contents;
}

/* 旧サイトの style="border-collapse: collapse; width: 100%;"（エディターの表の既定）の置き換え */
html:root figure.wp-block-table.ys-table-collapse > table {
	border-collapse: collapse;
	width: 100%;
}
