mirror of
https://github.com/insile/OpenWords.git
synced 2026-07-22 12:40:27 +00:00
194 lines
5 KiB
CSS
194 lines
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.
|
|
|
|
*/
|
|
|
|
|
|
/* 插件设置选项卡 */
|
|
.openwords-toggle-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr); /* 每行 4 列 */
|
|
gap: 10px; /* 每个 toggle 之间的间距 */
|
|
/* margin-top: 10px; */
|
|
}
|
|
.openwords-toggle-grid .setting-item:first-child {
|
|
padding-top: 10px;
|
|
border-top: 1px solid var(--background-modifier-border)
|
|
}
|
|
|
|
/* 学习模式模态框 */
|
|
.openwords-type-title {
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
font-size: 1.5em;
|
|
font-weight: bold;
|
|
}
|
|
.openwords-type-modal{
|
|
width: 650px; /* 设置模态框宽度 */
|
|
}
|
|
|
|
/* 背单词模态框 */
|
|
.openwords-card { /* 卡片容器样式 */
|
|
width: 500px; /* 固定宽度 */
|
|
height: 300px; /* 固定高度 */
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
border: 1px solid var(--color-border);
|
|
border-radius: 8px;
|
|
margin: 20px auto;
|
|
background-color: var(--background-primary);
|
|
text-align: center;
|
|
cursor: pointer; /* 鼠标悬停时显示手型 */
|
|
}
|
|
.openwords-card:hover {
|
|
background-color: var(--background-modifier-hover); /* 鼠标悬停时背景变浅 */
|
|
}
|
|
|
|
.openwords-card-content { /* 单词内容样式 */
|
|
font-size: 3em; /* 设置单词字体大小 */
|
|
font-weight: bold; /* 设置单词加粗 */
|
|
color: var(--text-normal); /* 设置单词颜色 */
|
|
margin-top: 24px;
|
|
}
|
|
|
|
.openwords-card-meta {
|
|
font-size: 0.85em;
|
|
line-height: 1.5;
|
|
margin-top: 24px;
|
|
|
|
}
|
|
|
|
.openwords-card-markdown { /* Markdown 内容样式 */
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow-y: auto; /* 添加垂直滚动条 */
|
|
background-color: var(--background-secondary); /* 更柔和的背景颜色 */
|
|
color: var(--text-muted); /* 使用正常文本颜色 */
|
|
font-size: 1.1em; /* 稍微增大字体 */
|
|
line-height: 1.6; /* 增加行高,提升可读性 */
|
|
border-radius: 8px; /* 添加圆角 */
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
|
|
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* 设置优雅的字体 */
|
|
user-select: text; /* 允许文本选择 */
|
|
}
|
|
|
|
.openwords-card-settings {
|
|
margin-top: 20px; /* 设置容器样式 */
|
|
font-size: 1em; /* 减小字体大小 */
|
|
}
|
|
|
|
.openwords-card-settings .setting-item {
|
|
padding: 5px 10px; /* 减小内边距 */
|
|
}
|
|
|
|
/* 单词列表模态框 */
|
|
.openwords-list{
|
|
width: 400px;
|
|
}
|
|
|
|
.openwords-list-title {
|
|
font-size: 1.5em;
|
|
font-weight: bold;
|
|
margin-bottom: 1em;
|
|
text-align: center;
|
|
}
|
|
|
|
.openwords-list-filters {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.openwords-list-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.openwords-list-filters .setting-item:first-child {
|
|
padding-top: 10px;
|
|
border-top: 1px solid var(--background-modifier-border)
|
|
}
|
|
|
|
.openwords-list-item { /* 单词项容器样式 */
|
|
display: flex; /* 设置为水平布局 */
|
|
justify-content: space-between; /* 左右对齐 */
|
|
border-bottom: 1px solid var(--background-modifier-border);
|
|
position: relative; /* 为预览容器提供定位上下文 */
|
|
}
|
|
|
|
.openwords-list-preview { /* Markdown 预览容器样式 */
|
|
font-size: 1em; /* 设置预览内容字体大小 */
|
|
line-height: 1.5; /* 设置行高 */
|
|
overflow-y: auto; /* 添加垂直滚动条 */
|
|
max-height: 300px; /* 设置最大高度 */
|
|
position: absolute; /* 设置绝对定位 */
|
|
top: 100%; /* 显示在单词项的下方 */
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 10; /* 确保预览内容在最上层 */
|
|
background-color: var(--background-secondary);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 5px;
|
|
padding: 10px;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
display: none; /* 默认隐藏 */
|
|
user-select: text; /* 允许文本选择 */
|
|
}
|
|
|
|
.openwords-list-text:hover .openwords-list-preview { /* 鼠标悬停时显示预览内容 */
|
|
display: block; /* 鼠标悬停时显示预览内容 */
|
|
}
|
|
|
|
.openwords-list-text { /* 单词文本样式 */
|
|
font-size: 1.1em;
|
|
color: var(--text-normal);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 默写单词模态框 */
|
|
.openwords-spelling {
|
|
width: auto;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
background-color: var(--background-primary);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.openwords-spelling-title {
|
|
font-size: 1.5em;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.openwords-spelling-input {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.openwords-spelling-letter {
|
|
width: 50px !important;
|
|
height: 50px !important;
|
|
text-align: center;
|
|
font-size: 1.5em !important;
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 5px;
|
|
outline: none;
|
|
}
|
|
|
|
.openwords-spelling-feedback {
|
|
margin-top: 10px;
|
|
text-align: center;
|
|
font-size: 1em;
|
|
color: var(--text-accent);
|
|
}
|