phanpy/src/components/shortcuts-settings.css

128 lines
3 KiB
CSS
Raw Normal View History

2023-02-16 12:51:54 +03:00
#shortcuts-settings-container .shortcuts-list {
line-height: 1.5;
padding: 0;
margin: 8px 0 0;
counter-reset: index;
border-radius: 8px;
overflow: hidden;
}
#shortcuts-settings-container .shortcuts-list li {
display: flex;
align-items: center;
padding: 8px;
gap: 4px;
background-color: var(--bg-faded-color);
}
#shortcuts-settings-container .shortcuts-list li::before {
content: counter(index);
counter-increment: index;
display: inline-block;
width: 1.2em;
text-align: right;
margin-right: 8px;
color: var(--text-insignificant-color);
font-size: 90%;
}
#shortcuts-settings-container .shortcuts-list li .shortcut-text {
flex-grow: 1;
2023-04-05 20:23:45 +03:00
min-width: 0;
line-height: 1;
word-break: break-word;
2023-02-16 12:51:54 +03:00
}
#shortcuts-settings-container .shortcuts-list li .shortcut-actions {
flex-shrink: 0;
}
2023-02-16 12:51:54 +03:00
2023-02-28 15:53:56 +03:00
#shortcuts-settings-container .shortcuts-view-mode {
display: flex;
align-items: center;
2023-03-09 18:37:25 +03:00
gap: 2px;
margin: 8px 0 0;
}
#shortcuts-settings-container .shortcuts-view-mode label {
border-radius: 4px;
background-color: var(--bg-faded-color);
padding: 16px;
text-align: center;
cursor: pointer;
display: block;
flex-grow: 1;
display: flex;
2023-02-28 15:53:56 +03:00
gap: 8px;
2023-03-09 18:37:25 +03:00
flex-direction: column;
align-items: center;
}
#shortcuts-settings-container .shortcuts-view-mode label:first-child {
border-top-left-radius: 16px;
border-bottom-left-radius: 16px;
}
#shortcuts-settings-container .shortcuts-view-mode label:last-child {
border-top-right-radius: 16px;
border-bottom-right-radius: 16px;
}
#shortcuts-settings-container .shortcuts-view-mode label img {
max-height: 64px;
}
@media (prefers-color-scheme: dark) {
#shortcuts-settings-container .shortcuts-view-mode label img {
filter: invert(0.9) hue-rotate(180deg);
}
}
2023-03-09 18:37:25 +03:00
#shortcuts-settings-container .shortcuts-view-mode label span {
text-align: center;
font-size: 80%;
}
#shortcuts-settings-container .shortcuts-view-mode label input {
position: absolute;
opacity: 0;
pointer-events: none;
perspective: 500px;
2023-03-09 18:37:25 +03:00
}
#shortcuts-settings-container .shortcuts-view-mode label input ~ * {
opacity: 0.5;
transform-origin: bottom;
transform: scale(0.975);
transition: all 0.2s ease-out;
2023-03-09 18:37:25 +03:00
}
#shortcuts-settings-container .shortcuts-view-mode label:has(input:checked) {
box-shadow: inset 0 0 0 3px var(--link-color);
}
#shortcuts-settings-container
.shortcuts-view-mode
label
input:is(:hover, :active, :checked)
~ * {
transform: scale(1);
2023-03-09 18:37:25 +03:00
opacity: 1;
2023-02-28 15:53:56 +03:00
}
2023-02-19 05:27:10 +03:00
#shortcuts-settings-container summary {
cursor: pointer;
}
#shortcut-settings-form form > * {
2023-02-16 12:51:54 +03:00
}
#shortcut-settings-form label {
2023-02-16 12:51:54 +03:00
display: flex;
flex-direction: row;
gap: 8px;
align-items: center;
}
#shortcut-settings-form label > span:first-child {
2023-02-16 12:51:54 +03:00
flex-basis: 5em;
text-align: right;
}
#shortcut-settings-form :is(input[type='text'], select) {
2023-02-16 12:51:54 +03:00
flex-grow: 1;
flex-basis: 70%;
flex-shrink: 1;
/* width: calc(100% - 32px); */
min-width: 0;
max-width: 320px;
}
2023-04-08 17:16:13 +03:00
#shortcut-settings-form form footer {
display: flex;
gap: 16px;
}