From 8e721c564d4534820a7b7febf81382ccf247b5c9 Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Fri, 18 Mar 2022 03:43:57 +0300 Subject: [PATCH] [docs] Improve rendering of class properties in docs (fixes #5073) --- docs/_static/js/script.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/_static/js/script.js b/docs/_static/js/script.js index f3e59258f53b..467c1d63ba6f 100644 --- a/docs/_static/js/script.js +++ b/docs/_static/js/script.js @@ -2,6 +2,12 @@ $(function() { /* Use wider container for the page content */ $('.wy-nav-content').each(function() { this.style.setProperty('max-width', 'none', 'important'); }); + /* List each class property item on a new line + https://github.com/microsoft/LightGBM/issues/5073 */ + if(window.location.pathname.toLocaleLowerCase().indexOf('pythonapi') != -1) { + $('.py.property').each(function() { this.style.setProperty('display', 'inline', 'important'); }); + } + /* Point to the same version of R API as the current docs version */ var current_version_elems = $('.rst-current-version'); if(current_version_elems.length !== 0) {