mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
styles refactor
This commit is contained in:
331
popup/popup.css
331
popup/popup.css
@@ -1,27 +1,15 @@
|
||||
@import url('../shared/fonts.css');
|
||||
@import url('../shared/colors.css');
|
||||
@import url('../shared/base.css');
|
||||
@import url('../shared/layout.css');
|
||||
@import url('../shared/word-list.css');
|
||||
@import url('../shared/ui-components.css');
|
||||
|
||||
/* Reset and Base Styles */
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-sans);
|
||||
font-size: var(--text-base);
|
||||
line-height: var(--leading-normal);
|
||||
letter-spacing: var(--tracking-tight);
|
||||
background: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
width: 380px;
|
||||
min-height: 500px;
|
||||
max-height: 600px;
|
||||
overflow: hidden;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -71,57 +59,18 @@ body {
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
/* Popup header uses shared .app-header; override padding only */
|
||||
.header.app-header {
|
||||
padding: 6px 12px;
|
||||
border-bottom: 1px solid var(--input-border);
|
||||
background: var(--bg-color);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.header-content.app-header-content {
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.header-logo {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
background: var(--text-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
html.dark .header-logo,
|
||||
body.dark .header-logo {
|
||||
background: var(--highlight-tag);
|
||||
}
|
||||
|
||||
.header-logo img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
.header-title.app-title {
|
||||
font-size: var(--text-base);
|
||||
font-weight: 600;
|
||||
letter-spacing: var(--tracking-tight);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-settings-btn,
|
||||
@@ -135,9 +84,6 @@ body.dark .header-logo {
|
||||
min-height: 28px;
|
||||
padding: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.header-settings-btn {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -590,7 +536,7 @@ body.dark .header-logo {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* Apply Button – same subdued primary style as list-manager */
|
||||
/* Apply button uses shared .btn-primary-subdued */
|
||||
.apply-button {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
@@ -598,9 +544,6 @@ body.dark .header-logo {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
background: rgba(255, 140, 0, 0.1);
|
||||
color: var(--accent);
|
||||
border: 1px solid rgba(255, 140, 0, 0.35);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: var(--text-base);
|
||||
@@ -609,28 +552,11 @@ body.dark .header-logo {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.apply-button:hover {
|
||||
background: rgba(255, 140, 0, 0.18);
|
||||
border-color: rgba(255, 140, 0, 0.5);
|
||||
}
|
||||
|
||||
html.dark .apply-button,
|
||||
body.dark .apply-button {
|
||||
background: rgba(255, 140, 0, 0.12);
|
||||
border-color: rgba(255, 140, 0, 0.4);
|
||||
}
|
||||
|
||||
html.dark .apply-button:hover,
|
||||
body.dark .apply-button:hover {
|
||||
background: rgba(255, 140, 0, 0.2);
|
||||
border-color: rgba(255, 140, 0, 0.55);
|
||||
}
|
||||
|
||||
.apply-button i {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Words Tab Styles */
|
||||
/* Words Tab Styles – layout only; shared word-list.css does the rest */
|
||||
.add-words-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -658,15 +584,25 @@ body.dark .apply-button:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.add-words-textarea {
|
||||
min-height: 56px;
|
||||
padding: 6px 8px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
.add-words-button {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: var(--text-md);
|
||||
color: var(--text-color);
|
||||
font-family: var(--font-sans);
|
||||
font-weight: 600;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.add-words-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.add-words-textarea {
|
||||
resize: none;
|
||||
line-height: var(--leading-relaxed);
|
||||
}
|
||||
@@ -675,50 +611,6 @@ body.dark .apply-button:hover {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.add-words-textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.add-words-button {
|
||||
width: 100%;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: rgba(255, 140, 0, 0.1);
|
||||
color: var(--accent);
|
||||
border: 1px solid rgba(255, 140, 0, 0.35);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-size: var(--text-md);
|
||||
font-weight: 600;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.add-words-button:hover {
|
||||
background: rgba(255, 140, 0, 0.18);
|
||||
border-color: rgba(255, 140, 0, 0.5);
|
||||
}
|
||||
|
||||
html.dark .add-words-button,
|
||||
body.dark .add-words-button {
|
||||
background: rgba(255, 140, 0, 0.12);
|
||||
border-color: rgba(255, 140, 0, 0.4);
|
||||
}
|
||||
|
||||
html.dark .add-words-button:hover,
|
||||
body.dark .add-words-button:hover {
|
||||
background: rgba(255, 140, 0, 0.2);
|
||||
border-color: rgba(255, 140, 0, 0.55);
|
||||
}
|
||||
|
||||
.add-words-button:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Word List Section */
|
||||
.word-list-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -733,188 +625,17 @@ body.dark .add-words-button:hover {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.word-actions-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.word-action-btn {
|
||||
height: 26px;
|
||||
padding: 0 8px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: var(--text-sm);
|
||||
font-weight: 500;
|
||||
color: var(--text-color);
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.word-action-btn:hover {
|
||||
background: var(--section-bg);
|
||||
}
|
||||
|
||||
.word-action-btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.word-action-btn.danger {
|
||||
background: rgba(239, 68, 68, 0.1);
|
||||
border-color: rgba(239, 68, 68, 0.3);
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.word-action-btn.danger:hover {
|
||||
background: rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
|
||||
/* Word Search */
|
||||
.word-search-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.word-search-input {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding: 0 12px;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
font-size: var(--text-md);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.word-search-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
/* Word List Container */
|
||||
.word-list-container {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background: var(--input-bg);
|
||||
border: 1px solid var(--input-border);
|
||||
border-radius: 8px;
|
||||
max-height: 200px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.word-list-empty {
|
||||
padding: 16px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.word-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
border-bottom: 1px solid var(--input-border);
|
||||
}
|
||||
|
||||
.word-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.word-item:hover {
|
||||
background: var(--highlight-tag);
|
||||
}
|
||||
|
||||
.word-item.selected {
|
||||
background: var(--section-bg);
|
||||
border-left: 3px solid var(--accent);
|
||||
padding-left: 9px;
|
||||
}
|
||||
|
||||
.word-item-text {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.word-item-edit-input {
|
||||
flex: 1;
|
||||
height: 28px;
|
||||
padding: 0 8px;
|
||||
background: var(--bg-color);
|
||||
border: 1px solid var(--accent);
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.word-item-edit-input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.word-item-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.word-item-icon-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
color: var(--text-color);
|
||||
opacity: 0.6;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.word-item-icon-btn:hover {
|
||||
opacity: 1;
|
||||
background: var(--highlight-tag);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.word-item-icon-btn i {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.word-item-color-picker {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--input-border);
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.word-item-color-picker::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.word-item-color-picker::-webkit-color-swatch {
|
||||
border: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.word-item-color-picker:hover {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.word-list-hint {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
<div class="popup-container">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="header">
|
||||
<div class="header-content">
|
||||
<div class="header-logo">
|
||||
<div class="header app-header">
|
||||
<div class="header-content app-header-content">
|
||||
<div class="header-logo app-logo">
|
||||
<img src="../img/logo-outlined.png" alt="Goose" style="width: 18px; height: 18px;">
|
||||
</div>
|
||||
<span class="header-title" data-i18n="extension_name">Goose Highlighter</span>
|
||||
<span class="header-title app-title" data-i18n="extension_name">Goose Highlighter</span>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<div class="header-actions app-header-actions">
|
||||
<button class="icon-button header-settings-btn" id="settingsBtn" data-i18n-title="options" title="Options" aria-label="Settings">
|
||||
<i class="fa-solid fa-gear"></i>
|
||||
</button>
|
||||
@@ -137,7 +137,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Apply Button -->
|
||||
<button class="apply-button" id="applyListSettingsBtn">
|
||||
<button class="apply-button btn-primary-subdued" id="applyListSettingsBtn">
|
||||
<i class="fa-solid fa-check"></i>
|
||||
<span data-i18n="apply">Apply Changes</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user