michaelfw-ui_mahgen-renderer/styles.css
2026-03-05 22:04:50 +08:00

132 lines
2.5 KiB
CSS

/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
:root {
--mahgen-base-height: 2.2em; /* 基础高度 (代码块使用) */
--mahgen-inline-height: 1.8em; /* 行内手牌高度 */
--mahgen-row-height: 2.2em; /* 河流行高度 */
}
/* 行内手牌样式 (装饰器实现) */
.mahgen-image {
height: var(--mahgen-inline-height);
width: auto;
display: inline-block !important;
}
/* 块级手牌样式 (后处理器实现) */
.mahgen-block-image {
height: var(--mahgen-base-height);
width: auto;
display: inline-block !important;
}
/* 河牌样式 */
.mahgen-river-image {
height: var(--mahgen-height);
width: auto;
display: inline-block !important;
}
/* Nankiru styles */
.nankiru-container {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border: 1px solid #e0e0e0;
border-radius: 4px;
background-color: #f8f8f8;
margin: 10px 0;
}
.nankiru-header {
display: flex;
font-weight: bold;
font-size: 1.2em;
}
.nankiru-prefix {
background-color: white;
color: black;
padding: 2px 6px;
border-radius: 3px 0 0 3px;
}
.nankiru-prefix.nankiru-prefix-answer {
color: #d32f2f;
border: 1px solid #d32f2f;
}
.nankiru-number {
background-color: black;
color: white;
padding: 2px 6px;
border-radius: 0 3px 3px 0;
}
.nankiru-number.nankiru-number-answer {
background-color: #d32f2f;
color: white;
}
.nankiru-info {
display: block; /* 改为块级容器 */
font-size: 0.9em;
text-align: left; /* 强制左对齐 */
}
.nankiru-env {
color: #1976d2;
font-weight: bold;
margin-right: 4px;
white-space: nowrap; /* 防止文本换行 */
display: inline; /* 内联元素 */
}
.nankiru-dora {
height: 1.5em;
vertical-align: middle;
display: inline; /* 内联元素 */
margin: 0; /* 移除所有边距 */
}
.nankiru-hand {
max-width: 100%;
display: block;
margin-right: auto;
}
.nankiru-answer {
display: flex;
align-items: center;
gap: 8px;
margin-top: 10px;
padding-top: 10px;
border-top: 1px dashed #ccc;
}
.nankiru-arrow {
font-size: 1.5em;
color: #d32f2f;
}
.nankiru-answer-hand {
max-width: 100%;
height: 2.6em;
}
.mahgen-furigana-ruby {
ruby-position: over;
}
.mahgen-furigana-ruby rt {
font-size: 0.58em;
line-height: 1;
}