ルビ記法
UserCSS.icon from /customize/ルビ
UserScript.icon
ルビ
#tiny
#均等割付
書式:&+ 内部リンク
[&+ [text]ruby]
[&+ text[ruby]]
ああああああああああああああ
例:テキストルビ、テキストルビ、私わたくし、baseannotation, basean notatio n
テキスト #hasht
ああああああああああああああ
ああああああああああああああ
code:style.css
html {
--ruby-color: hsl(from var(--page-text-color) h s l / calc(alpha * .9));
}
.line:not(.cursor-line) :where(span).deco-\&.deco-\+class="deco-\& deco-\+" {
display: inline flex;
flex-direction: column-reverse;
vertical-align: bottom;
/* base text */
& > span:not(.char-index):nth-of-type(1) {
display: inline flex; justify-content: center; min-width: 100%;
}
/* annotation text */
& > span:not(.char-index):nth-of-type(2) {
display: inline flex; min-width: 100%; justify-content: space-evenly; margin: -0.5em 0 -0.5em;
color: var(--ruby-color, var(--page-text-color, #444));
text-transform: var(--tiny-text-transform, uppercase);
line-height: 1.0; font-size: max(6px, var(--ruby-font-size, 0.7em));
font-weight: var(--ruby-font-weight, 550);
font-size-adjust: 0.5;
font-family:
var(--tiny-latin, "Roboto Flex", "Roboto", "Noto Sans", "Open Sans", Helvetica), var(--sans-serif-latin),
var(--tiny-ja, "BIZ UDゴシック", "BIZ UDGothic"), var(--sans-serif-ja),
sans-serif, var(--icons, "AppIcons");
--page-link-color: var(--ruby-color, var(--page-text-color, #444));
--empty-page-link-color: var(--page-link-color);
& > a.page-link {
/* pointer-events: none; */ min-width: 100%;
display: inline flex; justify-content: space-evenly;
}
}
}
テキスト範囲選択時のポップアップメニューにボタンを追加する #UserScript
code:script.js
scrapbox.PopupMenu.addButton({
title: 'Ruby',
onClick: text => text.split('\n').map(line => [&+ []${line}]).join('\n')
})
#記法
#UserCSS