p5.js-web-editor/client/styles/components/_searchbar.scss

75 lines
1.8 KiB
SCSS
Raw Normal View History

.searchbar {
2019-10-02 15:17:52 +00:00
position: relative;
display: flex;
padding-left: #{17 / $base-font-size}rem;
}
.searchbar__input {
width: #{240 / $base-font-size}rem;
height: #{36 / $base-font-size}rem;
border: solid 0.5px;
padding-left: #{36 / $base-font-size}rem;
padding-right: #{38 / $base-font-size}rem;
@include themify() {
border-color: getThemifyVariable('input-border-color');
background-color: getThemifyVariable('search-background-color');
}
}
button[type="submit"].searchbar__button {
background-color: unset;
width: #{31 / $base-font-size}rem;
height: #{36 / $base-font-size}rem;
position: absolute;
padding: 0;
border: 0;
border-right: solid 1px;
@include themify() {
border-right-color: getThemifyVariable('input-border-color');
}
&:enabled:hover {
background-color: unset;
@include themify() {
border-right-color: getThemifyVariable('input-border-color');
}
& g {
fill: unset;
}
}
}
.searchbar__icon {
display: inline-block;
& svg {
width: #{22 / $base-font-size}rem;
height: #{27 / $base-font-size}rem;
transform: scaleX(-1);
@include themify() {
fill: getThemifyVariable('input-text-color');
}
}
}
.searchbar__clear-button {
font-weight: bold;
font-size: #{10 / $base-font-size}rem;
text-align: center;
border-radius: 2px;
align-self: center;
position: absolute;
padding: #{3 / $base-font-size}rem #{4 / $base-font-size}rem;
left: #{216 / $base-font-size}rem;;
@include themify() {
color: getThemifyVariable('primary-text-color');
background-color: getThemifyVariable('search-clear-background-color');
&:hover, &:focus {
color: getThemifyVariable('search-hover-text-color');
background-color: getThemifyVariable('search-hover-background-color');
}
}
}
.searchbar--is-empty .searchbar__clear-button {
display: none;
}