Files
grimmory/frontend/src/app/features/readers/ebook-reader/shared/selection-popup.component.scss
T
James Cox 7058992145 style(frontend): enforce keyframes-name-pattern in scss
- Stylelint:
  - re-enable keyframes-name-pattern in the frontend Stylelint config
  - keep the rule rollout isolated so the animation naming change can be reviewed or reverted independently
- Animation styles:
  - rename camelCase keyframes to kebab-case in the flagged reader, metadata, auth, and directory-picker stylesheets
  - update the matching local animation references in the same files so behavior stays unchanged
- Validation:
  - run just ui stylelint
2026-04-22 17:26:46 -04:00

235 lines
4.0 KiB
SCSS

.popup-backdrop {
position: fixed;
inset: 0;
z-index: 99998;
background: transparent;
}
.text-selection-popup {
position: fixed;
display: flex;
align-items: center;
gap: 4px;
padding: 6px 8px;
background: linear-gradient(180deg, #2d3139 0%, #252830 100%);
border: 1px solid rgb(255 255 255 / 8%);
border-radius: 8px;
box-shadow: 0 4px 16px rgb(0 0 0 / 30%), 0 0 1px rgb(0 0 0 / 20%);
z-index: 99999;
transform: translateX(-50%);
animation: popup-fade-in 0.15s ease-out;
&.show-below {
animation: popup-fade-in-below 0.15s ease-out;
}
}
@keyframes popup-fade-in {
from {
opacity: 0;
transform: translateX(-50%) translateY(4px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
@keyframes popup-fade-in-below {
from {
opacity: 0;
transform: translateX(-50%) translateY(-4px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
.action-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 2px;
width: 32px;
height: 32px;
padding: 0;
border: none;
border-radius: 6px;
background: transparent;
color: rgb(255 255 255 / 80%);
cursor: pointer;
transition: all 0.15s ease;
&:hover {
background: rgb(255 255 255 / 10%);
color: #fff;
}
&.active {
background: rgb(255 255 255 / 12%);
color: #fff;
}
svg {
flex-shrink: 0;
}
.chevron {
margin-left: -2px;
transition: transform 0.2s ease;
&.open {
transform: rotate(180deg);
}
}
}
.delete-btn {
&:hover {
background: rgb(239 68 68 / 15%);
color: #ef4444;
}
}
.divider {
width: 1px;
height: 20px;
background: rgb(255 255 255 / 10%);
margin: 0 2px;
}
.annotation-container {
position: relative;
}
.annotation-options {
position: absolute;
left: 50%;
transform: translateX(-50%);
padding: 8px;
background: linear-gradient(180deg, #2d3139 0%, #252830 100%);
border: 1px solid rgb(255 255 255 / 8%);
border-radius: 8px;
box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
z-index: 100000;
display: flex;
flex-direction: column;
gap: 8px;
&.above {
bottom: calc(100% + 8px);
animation: slide-up 0.15s ease-out;
}
&.below {
top: calc(100% + 8px);
animation: slide-down 0.15s ease-out;
}
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateX(-50%) translateY(6px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
@keyframes slide-down {
from {
opacity: 0;
transform: translateX(-50%) translateY(-6px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}
.style-buttons {
display: flex;
gap: 4px;
}
.style-btn {
width: 32px;
height: 28px;
padding: 0;
border: 1px solid rgb(255 255 255 / 10%);
border-radius: 4px;
background: rgb(255 255 255 / 3%);
color: rgb(255 255 255 / 70%);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;
.style-text {
display: block;
}
&.highlight-style .style-text {
background: linear-gradient(180deg, rgb(255 255 0 / 40%) 60%, transparent 60%);
}
&.underline-style .style-text {
text-decoration: underline;
text-decoration-thickness: 2px;
}
&.squiggly-style .style-text {
text-decoration: underline wavy;
}
&.strikethrough-style .style-text {
text-decoration: line-through;
}
&:hover {
border-color: rgb(255 255 255 / 20%);
background: rgb(255 255 255 / 8%);
color: #fff;
}
&.selected {
border-color: #3b82f6;
background: rgb(59 130 246 / 15%);
color: #fff;
}
}
.color-buttons {
display: flex;
gap: 6px;
justify-content: center;
}
.color-btn {
width: 22px;
height: 22px;
padding: 0;
border: 2px solid transparent;
border-radius: 50%;
background: var(--color);
cursor: pointer;
transition: all 0.15s ease;
&:hover {
transform: scale(1.1);
}
&.selected {
border-color: #fff;
box-shadow: 0 0 0 2px rgb(59 130 246 / 50%);
}
}