From b97d986b773a0ba4590dfeac0bd0a963f0323ede Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Mon, 27 Jan 2025 21:51:40 +0100 Subject: [PATCH] Set cursor via JS --- python_docs_theme/static/pydoctheme.css | 2 +- python_docs_theme/static/sidebar.js_t | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python_docs_theme/static/pydoctheme.css b/python_docs_theme/static/pydoctheme.css index 65b218f..8327941 100644 --- a/python_docs_theme/static/pydoctheme.css +++ b/python_docs_theme/static/pydoctheme.css @@ -203,7 +203,7 @@ div.sphinxsidebar input[type='text'] { margin-left: 0; color: #444444; font-size: 1.2em; - cursor: col-resize; + cursor: default; /* cursor is set to 'col-resize' using JS */ padding-top: 1px; float: none; display: table; diff --git a/python_docs_theme/static/sidebar.js_t b/python_docs_theme/static/sidebar.js_t index bb8d4fa..63fe568 100644 --- a/python_docs_theme/static/sidebar.js_t +++ b/python_docs_theme/static/sidebar.js_t @@ -57,6 +57,7 @@ const initialiseSidebar = () => { sidebarbutton.tabindex = "0" // make it focusable sidebarbutton.role = "slider" sidebarbutton.title = _("Resize sidebar") + sidebarbutton.style.cursor = "col-resize" // Set the cursor only if JS is enabled sidebarbutton.setAttribute("aria-label", _("Resize sidebar by dragging")) sidebarbutton.setAttribute( "aria-valuetext",