Files
penx/apps/extension/entrypoints/content/command.scss
2025-09-08 23:18:46 +08:00

269 lines
5.3 KiB
SCSS

:root {
--cmdk-shadow: 0 16px 70px rgb(0 0 0 / 20%);
--lowContrast: #ffffff;
--highContrast: #000000;
--gray1: hsl(0, 0%, 99%);
--gray2: hsl(0, 0%, 97.3%);
--gray3: hsl(0, 0%, 95.1%);
--gray4: hsl(0, 0%, 93%);
--gray5: hsl(0, 0%, 90.9%);
--gray6: hsl(0, 0%, 88.7%);
--gray7: hsl(0, 0%, 85.8%);
--gray8: hsl(0, 0%, 78%);
--gray9: hsl(0, 0%, 56.1%);
--gray10: hsl(0, 0%, 52.3%);
--gray11: hsl(0, 0%, 43.5%);
--gray12: hsl(0, 0%, 9%);
--grayA1: hsla(0, 0%, 0%, 0.012);
--grayA2: hsla(0, 0%, 0%, 0.027);
--grayA3: hsla(0, 0%, 0%, 0.047);
--grayA4: hsla(0, 0%, 0%, 0.071);
--grayA5: hsla(0, 0%, 0%, 0.09);
--grayA6: hsla(0, 0%, 0%, 0.114);
--grayA7: hsla(0, 0%, 0%, 0.141);
--grayA8: hsla(0, 0%, 0%, 0.22);
--grayA9: hsla(0, 0%, 0%, 0.439);
--grayA10: hsla(0, 0%, 0%, 0.478);
--grayA11: hsla(0, 0%, 0%, 0.565);
--grayA12: hsla(0, 0%, 0%, 0.91);
--blue1: hsl(206, 100%, 99.2%);
--blue2: hsl(210, 100%, 98%);
--blue3: hsl(209, 100%, 96.5%);
--blue4: hsl(210, 98.8%, 94%);
--blue5: hsl(209, 95%, 90.1%);
--blue6: hsl(209, 81.2%, 84.5%);
--blue7: hsl(208, 77.5%, 76.9%);
--blue8: hsl(206, 81.9%, 65.3%);
--blue9: hsl(206, 100%, 50%);
--blue10: hsl(208, 100%, 47.3%);
--blue11: hsl(211, 100%, 43.2%);
--blue12: hsl(211, 100%, 15%);
}
.dark {
--app-bg: var(--gray1);
--lowContrast: #000000;
--highContrast: #ffffff;
--gray1: hsl(0, 0%, 8.5%);
--gray2: hsl(0, 0%, 11%);
--gray3: hsl(0, 0%, 13.6%);
--gray4: hsl(0, 0%, 15.8%);
--gray5: hsl(0, 0%, 17.9%);
--gray6: hsl(0, 0%, 20.5%);
--gray7: hsl(0, 0%, 24.3%);
--gray8: hsl(0, 0%, 31.2%);
--gray9: hsl(0, 0%, 43.9%);
--gray10: hsl(0, 0%, 49.4%);
--gray11: hsl(0, 0%, 62.8%);
--gray12: hsl(0, 0%, 93%);
--grayA1: hsla(0, 0%, 100%, 0);
--grayA2: hsla(0, 0%, 100%, 0.026);
--grayA3: hsla(0, 0%, 100%, 0.056);
--grayA4: hsla(0, 0%, 100%, 0.077);
--grayA5: hsla(0, 0%, 100%, 0.103);
--grayA6: hsla(0, 0%, 100%, 0.129);
--grayA7: hsla(0, 0%, 100%, 0.172);
--grayA8: hsla(0, 0%, 100%, 0.249);
--grayA9: hsla(0, 0%, 100%, 0.386);
--grayA10: hsla(0, 0%, 100%, 0.446);
--grayA11: hsla(0, 0%, 100%, 0.592);
--grayA12: hsla(0, 0%, 100%, 0.923);
--blue1: hsl(212, 35%, 9.2%);
--blue2: hsl(216, 50%, 11.8%);
--blue3: hsl(214, 59.4%, 15.3%);
--blue4: hsl(214, 65.8%, 17.9%);
--blue5: hsl(213, 71.2%, 20.2%);
--blue6: hsl(212, 77.4%, 23.1%);
--blue7: hsl(211, 85.1%, 27.4%);
--blue8: hsl(211, 89.7%, 34.1%);
--blue9: hsl(206, 100%, 50%);
--blue10: hsl(209, 100%, 60.6%);
--blue11: hsl(210, 100%, 66.1%);
--blue12: hsl(206, 98%, 95.8%);
}
.command-panel {
[cmdk-group-items] {
display: flex;
flex-direction: column;
gap: 1px;
}
[cmdk-item] {
&[data-selected='true'] .row-data {
display: flex;
}
.row-data {
display: none;
}
&[data-disabled='true'] {
color: var(--gray8);
cursor: not-allowed;
}
&:active {
transition-property: background;
background: var(--gray4);
}
svg {
width: 18px;
height: 18px;
}
}
[cmdk-group-heading] {
user-select: none;
font-size: 12px;
color: var(--gray11);
display: flex;
align-items: center;
}
[cmdk-separator] {
height: 1px;
width: 100%;
background: var(--gray5);
margin: 4px 0;
}
}
.action-menu {
[cmdk-group-heading] {
text-transform: capitalize;
font-size: 12px;
color: var(--gray11);
font-weight: 500;
margin-bottom: 8px;
margin-top: 8px;
margin-left: 4px;
}
[cmdk-input] {
font-size: 13px;
width: 100%;
outline: 0;
border-radius: 0;
}
animation-duration: 0.2s;
animation-timing-function: ease;
animation-fill-mode: forwards;
transform-origin: var(--radix-popover-content-transform-origin);
[cmdk-empty] {
display: flex;
align-items: center;
justify-content: center;
height: 64px;
white-space: pre-wrap;
font-size: 14px;
color: var(--gray11);
}
}
[command-palette-loader] {
--loader-color: var(--gray9);
border: 0;
width: 100%;
height: 1px;
/* background: var(--gray6); */
background: transparent;
/* top: 0x; */
position: absolute;
bottom: -2px;
overflow: visible;
display: block;
margin: 0;
z-index: 10;
&:after {
content: '';
width: 50%;
height: 1px;
position: absolute;
background: linear-gradient(
90deg,
transparent 0%,
#888 40%,
transparent 100%
);
top: -1px;
opacity: 0;
animation-duration: 1.5s;
animation-delay: 1s;
animation-timing-function: ease;
animation-name: loading;
animation-iteration-count: infinite;
}
}
@keyframes loading {
0% {
opacity: 0;
transform: translateX(0);
}
50% {
opacity: 1;
transform: translateX(100%);
}
100% {
opacity: 0;
transform: translateX(0);
}
}
@keyframes shine {
to {
background-position: 200% center;
opacity: 0;
}
}
@keyframes border {
to {
box-shadow: 0 0 0 1px var(--gray6);
}
}
@keyframes showTopShine {
to {
opacity: 1;
}
}
@keyframes slideIn {
0% {
opacity: 0;
transform: scale(0.96);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes slideOut {
0% {
opacity: 1;
transform: scale(1);
}
100% {
opacity: 0;
transform: scale(0.96);
}
}