From 11427c11fc5d258ee13847f6bfc5e85b415faf0c Mon Sep 17 00:00:00 2001 From: Revathyvenugopal162 Date: Fri, 9 May 2025 14:50:33 +0200 Subject: [PATCH 01/21] fix: search button for field --- .../assets/styles/ast-search.scss | 55 ++++++++++++++++--- .../components/search-button-field.html | 2 +- 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/src/ansys_sphinx_theme/assets/styles/ast-search.scss b/src/ansys_sphinx_theme/assets/styles/ast-search.scss index 6766c41e3..6d4d73c24 100644 --- a/src/ansys_sphinx_theme/assets/styles/ast-search.scss +++ b/src/ansys_sphinx_theme/assets/styles/ast-search.scss @@ -1,4 +1,8 @@ /* Static Search Results Container */ + +.bd-search{ + display: flex; +} .static-search-results { display: flex; flex-direction: column; @@ -150,20 +154,53 @@ html[data-theme="light"] .highlight { } /* Responsive Styles */ -@media (max-width: 48rem) { /* 768px */ - .bd-search input.expanded { - width: 6.25rem; /* 100px */ +@media (min-width: 64rem) and (max-width: 85.375rem) { + .bd-search { + flex-grow: 1; + justify-content: flex-end; + padding-left: 1rem; + padding-right: 1rem; + } + + .bd-search input.form-control.expanded { + width: 16rem; /* 256px */ + } + + .bd-search input.form-control { + width: 8rem; /* 128px */ + } + + .bd-search .search-button__kbd-shortcut { + display: none !important; + } + + /* Adjust top bar container if needed */ + .navbar, + .topbar { + padding-left: 1rem; + padding-right: 1rem; + gap: 1rem; + } +} + +@media (max-width: 64rem) { + .bd-search { + flex-grow: 1; + justify-content: flex-end; + padding-left: 1rem; + padding-right: 1rem; } - .form-control { - width: 3.125rem; /* 50px */ + .bd-search input.form-control.expanded { + width: 10rem; /* 160px */ } - .result { - width: 6.25rem; /* 100px */ + .bd-search input.form-control { + width: 8rem; /* 128px */ } .bd-search .search-button__kbd-shortcut { - display: none; + display: none !important; } -} \ No newline at end of file +} +/* Search Icon */ \ No newline at end of file diff --git a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/search-button-field.html b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/search-button-field.html index eee4e6945..6b197906f 100644 --- a/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/search-button-field.html +++ b/src/ansys_sphinx_theme/theme/ansys_sphinx_theme/components/search-button-field.html @@ -1,5 +1,5 @@ -