mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 16:20:33 +08:00
1 parent
ad23f0f8b0
commit
f05275c6b8
2 files changed
+31
-27
No files matched your search
+29
-26
@@ -640,6 +640,7 @@ a:focus-visible {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.font-listbox .font-option {
|
.font-listbox .font-option {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -662,10 +663,26 @@ a:focus-visible {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.font-listbox .font-option:hover,
|
.font-listbox .font-option:not([data-disabled="true"]):hover,
|
||||||
.font-listbox [data-selected="true"] {
|
.font-listbox [data-selected="true"] {
|
||||||
background: var(--selected);
|
background: var(--hover);
|
||||||
color: var(--accent);
|
}
|
||||||
|
|
||||||
|
.font-listbox [data-selected="true"] {
|
||||||
|
outline: 1px solid var(--focus);
|
||||||
|
outline-offset: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-listbox [data-current="true"] {
|
||||||
|
color: var(--accent-strong);
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-listbox [data-current="true"]::before {
|
||||||
|
position: absolute;
|
||||||
|
inset: 6px auto 6px 0;
|
||||||
|
width: 2px;
|
||||||
|
background: var(--accent);
|
||||||
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
.font-listbox [data-disabled="true"],
|
.font-listbox [data-disabled="true"],
|
||||||
@@ -673,6 +690,10 @@ a:focus-visible {
|
|||||||
color: var(--text-muted);
|
color: var(--text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.font-listbox [data-disabled="true"] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
.font-search-empty {
|
.font-search-empty {
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
}
|
}
|
||||||
@@ -1915,21 +1936,6 @@ button:not(:disabled):hover {
|
|||||||
background: var(--accent-strong);
|
background: var(--accent-strong);
|
||||||
}
|
}
|
||||||
|
|
||||||
.format-select:focus,
|
|
||||||
.format-select:focus-visible,
|
|
||||||
.order-select:focus,
|
|
||||||
.order-select:focus-visible {
|
|
||||||
border-color: var(--accent);
|
|
||||||
outline: 2px solid var(--accent);
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.format-select option:checked,
|
|
||||||
.order-select option:checked {
|
|
||||||
background-color: var(--selected);
|
|
||||||
color: var(--accent-strong);
|
|
||||||
}
|
|
||||||
|
|
||||||
.zoom-label {
|
.zoom-label {
|
||||||
min-width: 42px;
|
min-width: 42px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -2071,10 +2077,6 @@ body[data-hide-meta] .meta-panel {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.document-select:not(:disabled):hover {
|
|
||||||
background-color: var(--hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.document-dialog {
|
.document-dialog {
|
||||||
width: 440px;
|
width: 440px;
|
||||||
}
|
}
|
||||||
@@ -4795,10 +4797,6 @@ audio.page-media {
|
|||||||
background-color: var(--input);
|
background-color: var(--input);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-toolbar > .editor-group > select:not(:disabled):hover {
|
|
||||||
background-color: var(--hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-surface,
|
.page-surface,
|
||||||
.thumb-paper,
|
.thumb-paper,
|
||||||
.print-preview-page img,
|
.print-preview-page img,
|
||||||
@@ -4932,6 +4930,11 @@ audio.page-media {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select:not(:disabled):hover,
|
||||||
|
#textAlign:not(:disabled):hover {
|
||||||
|
background-color: var(--hover);
|
||||||
|
}
|
||||||
|
|
||||||
select:not([multiple]):not([size]) {
|
select:not([multiple]):not([size]) {
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background-image: var(--dropdown-arrow);
|
background-image: var(--dropdown-arrow);
|
||||||
|
|||||||
@@ -98,12 +98,13 @@ export class FontPicker {
|
|||||||
return terms.every(term => name.includes(term));
|
return terms.every(term => name.includes(term));
|
||||||
});
|
});
|
||||||
this.list.replaceChildren();
|
this.list.replaceChildren();
|
||||||
for (const { font, index } of this.matches) {
|
for (const { font, index, group } of this.matches) {
|
||||||
const option = document.createElement("div");
|
const option = document.createElement("div");
|
||||||
option.className = "font-option";
|
option.className = "font-option";
|
||||||
option.id = `${this.list.id}-${index}`;
|
option.id = `${this.list.id}-${index}`;
|
||||||
option.dataset.index = String(index);
|
option.dataset.index = String(index);
|
||||||
option.setAttribute("data-disabled", String(Boolean(font.disabled)));
|
option.setAttribute("data-disabled", String(Boolean(font.disabled)));
|
||||||
|
option.setAttribute("data-current", String(!font.disabled && group.includes(Number(this.value))));
|
||||||
const name = document.createElement("span");
|
const name = document.createElement("span");
|
||||||
name.textContent = font.menuFamily || font.fullName || font.name;
|
name.textContent = font.menuFamily || font.fullName || font.name;
|
||||||
option.append(name);
|
option.append(name);
|
||||||
|
|||||||
Reference in new issue
Block a user