mirror of
https://github.com/hyungyunlim/obsidian-korean-grammar-assistant.git
synced 2026-07-22 06:42:55 +00:00
1. Remove main.js from git repository 2. Update LICENSE year from 2025 to 2026 3. Prefix all generic CSS classes with 'kga-' namespace to avoid conflicts with other plugins and Obsidian itself 4. Use registerEvent() for workspace events to ensure proper cleanup 5. Convert commands to conditional commands using checkCallback 6. Remove global variables (window.koreanGrammarPlugin) and use callback injection pattern instead 7. Replace deprecated activeLeaf with getActiveViewOfType(MarkdownView) 8. Remove top-level heading from settings tab per Obsidian guidelines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
163 lines
4.1 KiB
CSS
163 lines
4.1 KiB
CSS
/* styles/error-highlight.css */
|
|
|
|
.spell-error {
|
|
background: rgba(var(--color-red-rgb), 0.1);
|
|
color: var(--color-red);
|
|
padding: 2px 0;
|
|
border-bottom: 2px dotted var(--color-red);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.spell-error:hover {
|
|
background: rgba(var(--color-red-rgb), 0.2);
|
|
}
|
|
|
|
.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.kga-clickable-error:hover {
|
|
background: rgba(var(--color-red-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-red);
|
|
}
|
|
|
|
.kga-clickable-error:active {
|
|
background: rgba(var(--color-red-rgb), 0.3);
|
|
}
|
|
|
|
.spell-corrected {
|
|
background: rgba(var(--color-green-rgb), 0.1);
|
|
color: var(--color-green);
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid var(--color-green);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error:hover {
|
|
background: rgba(var(--color-green-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-green);
|
|
}
|
|
|
|
.spell-corrected.kga-clickable-error:active {
|
|
background: rgba(var(--color-green-rgb), 0.3);
|
|
}
|
|
|
|
.spell-exception-processed {
|
|
background: rgba(var(--color-blue-rgb), 0.1);
|
|
color: var(--color-blue);
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid var(--color-blue);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error:hover {
|
|
background: rgba(var(--color-blue-rgb), 0.25);
|
|
border-bottom: 2px solid var(--color-blue);
|
|
}
|
|
|
|
.spell-exception-processed.kga-clickable-error:active {
|
|
background: rgba(var(--color-blue-rgb), 0.3);
|
|
}
|
|
|
|
.spell-original-kept {
|
|
background: rgba(255, 165, 0, 0.15); /* 주황색 배경 */
|
|
color: #e67e00; /* 진한 주황색 텍스트 */
|
|
padding: 2px 0;
|
|
border-bottom: 2px dotted #e67e00;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error:hover {
|
|
background: rgba(255, 165, 0, 0.25);
|
|
border-bottom: 2px solid #e67e00;
|
|
}
|
|
|
|
.spell-original-kept.kga-clickable-error:active {
|
|
background: rgba(255, 165, 0, 0.35);
|
|
}
|
|
|
|
.spell-user-edited {
|
|
background: rgba(139, 92, 246, 0.15); /* 보라색 배경 */
|
|
color: #8b5cf6; /* 진한 보라색 텍스트 */
|
|
padding: 2px 0;
|
|
border-bottom: 2px solid #8b5cf6;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error {
|
|
cursor: pointer;
|
|
position: relative;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error:hover {
|
|
background: rgba(139, 92, 246, 0.25);
|
|
border-bottom: 2px solid #8b5cf6;
|
|
}
|
|
|
|
.spell-user-edited.kga-clickable-error:active {
|
|
background: rgba(139, 92, 246, 0.35);
|
|
}
|
|
|
|
/* 🤖 인라인 모드 AI 분석 결과별 색상 스타일 */
|
|
.korean-grammar-error-inline[data-ai-status="exception"] {
|
|
text-decoration: wavy underline #3b82f6 2px !important;
|
|
background-color: rgba(59, 130, 246, 0.1) !important;
|
|
}
|
|
|
|
.korean-grammar-error-inline[data-ai-status="keep-original"] {
|
|
text-decoration: wavy underline #f59e0b 2px !important;
|
|
background-color: rgba(245, 158, 11, 0.1) !important;
|
|
}
|
|
|
|
/* 🤖 corrected 상태는 이제 Replace Decoration + Widget으로 처리됨 */
|
|
/* 기존 CSS pseudo-element 방식 제거 - Widget이 완전히 대체함 */
|
|
|
|
/* 호버 상태 */
|
|
.korean-grammar-error-inline[data-ai-status="exception"]:hover {
|
|
background-color: rgba(59, 130, 246, 0.2) !important;
|
|
}
|
|
|
|
.korean-grammar-error-inline[data-ai-status="keep-original"]:hover {
|
|
background-color: rgba(245, 158, 11, 0.2) !important;
|
|
}
|
|
|
|
/* corrected 호버 효과도 Widget 내부에서 처리됨 */
|
|
|
|
/* 🤖 AI Text Widget Styles */
|
|
.korean-grammar-ai-widget {
|
|
color: #10b981;
|
|
text-decoration: wavy underline #10b981 2px;
|
|
background-color: rgba(16, 185, 129, 0.1);
|
|
cursor: pointer;
|
|
display: inline;
|
|
font-family: inherit;
|
|
font-size: inherit;
|
|
line-height: inherit;
|
|
}
|
|
|
|
/* AI Widget 호버 상태 */
|
|
.korean-grammar-ai-widget:hover {
|
|
background-color: rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
/* AI Widget 포커스 상태 */
|
|
.korean-grammar-ai-widget:focus {
|
|
outline: 2px solid #10b981;
|
|
outline-offset: 1px;
|
|
}
|