Skip to content

armgit / Pake

Public Imported from GitHub
0

Turn any website into a lightweight desktop app with one command, on macOS, Windows and Linux.

fix: constrain x.com search form width after X layout update (#1355)

yuyic007ff765822
diff --git a/src-tauri/src/inject/style.js b/src-tauri/src/inject/style.js
index 68526d15..7950beb3 100644
--- a/src-tauri/src/inject/style.js
+++ b/src-tauri/src/inject/style.js
@@ -240,20 +240,18 @@ window.addEventListener("DOMContentLoaded", (_event) => {
position: fixed !important;
top: 12px !important;
right: 16px !important;
+ left: auto !important;
+ width: 182px !important;
}
- #react-root [data-testid="sidebarColumn"] input[placeholder="Search"] {
- width: 150px;
+ #react-root [data-testid="sidebarColumn"] form[role="search"] input[data-testid="SearchBox_Search_Input"] {
+ width: 100% !important;
}
#react-root [data-testid="sidebarColumn"] form[role="search"]:focus-within {
width: 280px !important;
backdrop-filter: blur(12px) !important;
}
-
- #react-root [data-testid="sidebarColumn"] input[placeholder="Search"]:focus {
- width: 234px !important;
- }
}
@media only screen and (min-width: 1265px) {
@@ -262,10 +260,12 @@ window.addEventListener("DOMContentLoaded", (_event) => {
position: fixed !important;
top: 12px !important;
right: 16px !important;
+ left: auto !important;
+ width: 182px !important;
}
- #react-root [data-testid="sidebarColumn"] input[placeholder="Search"] {
- width: 150px;
+ #react-root [data-testid="sidebarColumn"] form[role="search"] input[data-testid="SearchBox_Search_Input"] {
+ width: 100% !important;
}
#react-root [data-testid="sidebarColumn"] form[role="search"]:focus-within {
@@ -273,10 +273,6 @@ window.addEventListener("DOMContentLoaded", (_event) => {
backdrop-filter: blur(12px) !important;
}
- #react-root [data-testid="sidebarColumn"] input[placeholder="Search"]:focus {
- width: 328px !important;
- }
-
#react-root div[style*="left: -12px"] {
left: unset !important;
}