Files
koodo-reader/src/components/dialogs/annotationDialog/annotationDialog.css
T
troyeguo 3927c7d45c feat(annotation): add text annotation features including size, font, and color
- Added new text annotation options in English and Chinese localization files.
- Updated CSS for text size and font selection in the annotation dialog.
- Enhanced the annotation dialog component to handle text size, font, and color selections.
- Introduced new constants for text size limits and color options.
- Refactored existing annotation state management to accommodate new text properties.
2026-07-21 17:26:03 +08:00

204 lines
4.0 KiB
CSS

.annotation-dialog-container {
padding: 12px 16px 16px;
box-sizing: border-box;
}
.annotation-dialog-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
}
.annotation-dialog-title {
font-size: 15px;
font-weight: 600;
}
.annotation-dialog-close {
font-size: 18px;
cursor: pointer;
opacity: 0.6;
transition: opacity 0.15s;
}
.annotation-dialog-close:hover {
opacity: 1;
}
.annotation-dialog-section {
margin-bottom: 14px;
}
.annotation-dialog-section:last-child {
margin-bottom: 0;
}
.annotation-dialog-label {
font-size: 13px;
margin-bottom: 8px;
}
.annotation-color-list {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 0;
padding: 0;
list-style: none;
}
.annotation-color-item {
width: 26px;
height: 26px;
border-radius: 50%;
cursor: pointer;
box-sizing: border-box;
border: 2px solid transparent;
transition:
border-color 0.15s,
transform 0.15s;
}
.annotation-color-item:hover {
transform: scale(1.1);
}
.active-annotation-color-item {
border-color: rgba(0, 0, 0, 0.4);
}
.annotation-width-list {
display: flex;
align-items: center;
gap: 14px;
margin: 0;
padding: 0;
list-style: none;
}
.annotation-width-item {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 8px;
cursor: pointer;
box-sizing: border-box;
border: 2px solid transparent;
transition:
border-color 0.15s,
background-color 0.15s;
}
.annotation-width-item:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.active-annotation-width-item {
border-color: rgba(0, 0, 0, 0.4);
}
.annotation-width-preview {
display: block;
width: 26px;
}
.annotation-dialog-tabs {
display: flex;
gap: 8px;
padding: 5px;
margin-bottom: 9px;
border-radius: 8px;
}
.annotation-dialog-tab {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
height: 24px;
border-radius: 8px;
cursor: pointer;
box-sizing: border-box;
transition:
opacity 0.15s,
background-color 0.15s,
border-color 0.15s;
user-select: none;
}
.annotation-dialog-tab:hover {
opacity: 0.85;
}
.active-annotation-dialog-tab {
opacity: 1;
background-color: rgba(0, 0, 0, 0.06);
border-color: rgba(0, 0, 0, 0.4);
}
.annotation-dialog-tab-icon {
font-size: 18px;
}
.annotation-dialog-tab-shape {
display: flex;
align-items: center;
justify-content: center;
line-height: 0;
}
.annotation-shape-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.annotation-shape-item {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 8px;
cursor: pointer;
box-sizing: border-box;
border: 2px solid transparent;
color: var(--text-color, inherit);
transition:
border-color 0.15s,
background-color 0.15s;
}
.annotation-shape-item:hover {
background-color: rgba(0, 0, 0, 0.05);
}
.active-annotation-shape-item {
border-color: rgba(0, 0, 0, 0.4);
}
.annotation-color-fill {
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
pointer-events: none;
}
.annotation-opacity-section {
margin-bottom: 0;
}
.annotation-opacity-label {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 13px;
margin-bottom: 8px;
}
.annotation-opacity-value {
font-variant-numeric: tabular-nums;
}
.annotation-opacity-slider {
width: 100%;
margin: 0;
cursor: pointer;
}
.annotation-text-size-section {
margin-bottom: 20px;
}
.annotation-text-font-select {
width: 100% !important;
left: 0 !important;
margin-right: 0 !important;
height: 30px;
padding: 0 8px;
box-sizing: border-box;
border: 1px solid rgba(0, 0, 0, 0.15);
background-color: var(--background-color, #fff);
color: var(--text-color, inherit);
outline: none;
transition: border-color 0.15s;
}
.annotation-text-font-select:hover,
.annotation-text-font-select:focus {
border-color: rgba(0, 0, 0, 0.4);
}