From 8f04081b8c78341b444ef96e98fa5b3c4ef83384 Mon Sep 17 00:00:00 2001 From: Liu Xinyu Date: Wed, 25 Apr 2018 20:30:22 +0800 Subject: [PATCH] fix: avoid the searchbox exceeded out of screen in narrow screen (#254) --- lib/default-theme/SearchBox.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/default-theme/SearchBox.vue b/lib/default-theme/SearchBox.vue index fcda1f4d..86787708 100644 --- a/lib/default-theme/SearchBox.vue +++ b/lib/default-theme/SearchBox.vue @@ -184,14 +184,22 @@ export default { color $accentColor @media (max-width: $MQNarrow) - .search-box input - width 0 - border-color transparent - position relative - left 1rem - &:focus + .search-box + input + cursor pointer + width 0 + border-color transparent + position relative + left 1rem + &:focus + cursor text + left 0 + width 10rem + +@media (max-width: $MQNarrow) and (min-width: $MQMobile) + .search-box + .suggestions left 0 - width 10rem @media (max-width: $MQMobile) .search-box -- GitLab