FreeTube/src/renderer/components/ft-input/ft-input.css

223 lines
4.6 KiB
CSS

/* stylelint-disable no-descending-specificity */
.ft-input-component {
position: relative;
}
body[dir='rtl'] .ft-input-component.search.showClearTextButton .inputAction {
inset-inline-end: -30px;
}
body[dir='rtl'] .ft-input-component.search.clearTextButtonVisible .inputAction,
body[dir='rtl'] .ft-input-component.search.showClearTextButton:focus-within .inputAction {
inset-inline-end: 0;
}
.ft-input-component.search.showClearTextButton {
padding-inline-start: 30px;
}
.ft-input-component.search.clearTextButtonVisible,
.ft-input-component.search.showClearTextButton:focus-within {
padding-inline-start: 0;
}
.ft-input-component.showClearTextButton:not(.search) .ft-input {
padding-inline-start: 46px;
}
/* Main search input */
.clearTextButtonVisible.search .ft-input,
.ft-input-component.search.showClearTextButton:focus-within .ft-input {
padding-inline-start: 46px;
}
.ft-input-component:focus-within .clearInputTextButton {
opacity: 0.5;
}
.clearTextButtonVisible .clearInputTextButton.visible,
.ft-input-component:focus-within .clearInputTextButton.visible {
cursor: pointer;
opacity: 1;
}
.disabled label, .disabled .ft-input{
opacity: 0.4;
cursor: not-allowed;
}
.clearInputTextButton {
position: absolute;
inset-block-start: 5px;
inset-inline-start: 0;
/* To be higher than `.inputWrapper` */
z-index: 1;
margin-block: 0;
margin-inline: 3px;
padding: 10px;
border-radius: 100%;
color: var(--primary-text-color);
opacity: 0;
transition: background 0.2s ease-in;
}
.clearInputTextButton.visible:hover {
background-color: var(--side-nav-hover-color);
color: var(--side-nav-hover-text-color);
}
.forceTextColor .clearInputTextButton:hover {
background-color: var(--primary-color-hover);
}
.clearInputTextButton.visible:active {
background-color: var(--tertiary-text-color);
color: var(--side-nav-active-text-color);
transition: background 0.2s ease-in;
}
.search .clearInputTextButton {
inset-block-start: 12px;
}
.forceTextColor .clearInputTextButton {
color: #EEE;
}
.forceTextColor .clearInputTextButton:active {
background-color: var(--primary-color-active);
}
.ft-input {
box-sizing: border-box;
outline: none;
inline-size: 100%;
padding: 1rem;
border: 0;
margin-block-end: 10px;
font-size: 16px;
block-size: 45px;
color: var(--secondary-text-color);
border-radius: 5px;
background-color: var(--search-bar-color);
}
.ftcomponent ::placeholder {
color: var(--tertiary-text-color);
user-select: none;
}
.forceTextColor .ft-input {
color: #EEE;
background-color: var(--primary-input-color);
}
.forceTextColor .ft-input:focus {
box-shadow: 0 0 1rem 0 var(--primary-input-color);
transition: box-shadow 0.2s ease-in-out;
}
.forceTextColor ::placeholder {
color: #EEE;
}
.inputWrapper {
position: relative;
}
.inputAction {
position: absolute;
margin-block: 0;
margin-inline: 3px;
padding: 10px;
inset-block-start: -8px;
inset-inline-end: 0;
border-radius: 100%;
color: var(--primary-text-color);
/* this should look disabled by default */
opacity: 0.5;
}
.inputAction.enabled {
opacity: 1;
/* Only look respond to cursor when enabled */
cursor: pointer;
}
.search ::-webkit-calendar-picker-indicator {
display: none;
}
.forceTextColor .inputAction {
color: #EEE;
}
.ft-input-component.showActionButton .ft-input {
/*
With arrow present means
the text might get under the arrow with normal padding
*/
padding-inline-end: calc(36px + 6px);
}
.inputAction.enabled:hover {
background-color: var(--side-nav-hover-color);
color: var(--side-nav-hover-text-color);
transition: background 0.2s ease-in;
}
.forceTextColor .inputAction.enabled:hover {
background-color: var(--primary-color-hover);
}
.inputAction.enabled:active {
background-color: var(--tertiary-text-color);
color: var(--side-nav-active-text-color);
transition: background 0.2s ease-in;
}
.forceTextColor .inputAction.enabled:active {
background-color: var(--primary-color-active);
}
.list {
position: absolute;
inline-size: 100%;
list-style: none;
margin: 0;
padding-block: 5px;
padding-inline: 0;
z-index: 10;
border-radius: 0 0 5px 5px;
word-wrap: break-word;
box-shadow: 0 0 10px var(--scrollbar-color-hover);
background-color: var(--search-bar-color);
}
.list li {
display: block;
padding-block: 0;
padding-inline: 15px;
line-height: 2rem;
}
.list .bookmarked {
display: flex;
justify-content: space-between;
align-items: center;
}
.bookmarkStarIcon {
color: var(--favorite-icon-color);
opacity: 0.6;
}
.hover {
background-color: var(--scrollbar-color-hover);
color: var(--scrollbar-text-color-hover);
}