118 lines
2.5 KiB
Plaintext
118 lines
2.5 KiB
Plaintext
// @import 'tdesign-mobile-react/es/style/index.css'; // 少量公共样式
|
|
|
|
.oak-search {
|
|
display: flex;
|
|
padding: 5px 10px;
|
|
background-color: #fff;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
|
|
&__form {
|
|
position: relative;
|
|
flex: auto;
|
|
background-color: #f5f5f5;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
&__box {
|
|
position: relative;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding-left: 36px;
|
|
padding-right: 32px;
|
|
border-radius: inherit;
|
|
box-sizing: border-box;
|
|
z-index: 1;
|
|
}
|
|
|
|
&__label {
|
|
position: absolute;
|
|
display: flex;
|
|
top: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
font-size: 0;
|
|
color: #0006;
|
|
background-color: #f5f5f5;
|
|
align-items: center;
|
|
justify-content: center;
|
|
vertical-align: middle;
|
|
z-index: 2;
|
|
|
|
&-text {
|
|
display: inline-block;
|
|
font-size: 16px;
|
|
color: #0006;
|
|
margin-left: 8px;
|
|
vertical-align: middle;
|
|
}
|
|
}
|
|
|
|
&__input {
|
|
font-size: 16px;
|
|
color: #000000e6;
|
|
width: 100%;
|
|
height: 40px;
|
|
background-color: #f5f5f5;
|
|
padding: 0 16px;
|
|
border: 0;
|
|
outline: none;
|
|
/* stylelint-disable-next-line */
|
|
input::-webkit-input-placeholder,
|
|
input::placeholder {
|
|
color: rgba(0, 0, 0, 0.4);
|
|
}
|
|
|
|
input::-webkit-search-decoration,
|
|
input::-webkit-search-cancel-button,
|
|
input::-webkit-search-results-button,
|
|
input::-webkit-search-results-decoration {
|
|
display: none;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
&__icon-search {
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateX(-100%) translateY(-50%);
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
color: #0006;
|
|
}
|
|
|
|
&__label-icon-search {
|
|
font-size: 24px;
|
|
line-height: 24px;
|
|
}
|
|
|
|
&__icon-close {
|
|
position: absolute;
|
|
top: 50%;
|
|
transform: translateX(0) translateY(-50%);
|
|
right: 12px;
|
|
font-size: 24px;
|
|
line-height: 1;
|
|
color: #0006;
|
|
}
|
|
|
|
&__cancel-button {
|
|
display: none;
|
|
margin-left: 5px;
|
|
margin-right: -5px;
|
|
}
|
|
|
|
&.oak-search-is-focused {
|
|
.oak-search {
|
|
&__cancel-button {
|
|
display: block;
|
|
}
|
|
|
|
&__label {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
} |