From 183e7152eac72b2bb5b22122504996f1e24f30d6 Mon Sep 17 00:00:00 2001 From: Gael Varoquaux Date: Mon, 19 Jun 2023 17:45:39 +0200 Subject: [PATCH] Better CSS for doc links --- sklearn/utils/_estimator_html_repr.css | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/sklearn/utils/_estimator_html_repr.css b/sklearn/utils/_estimator_html_repr.css index 93af4a0630226..7afbda23ba22d 100644 --- a/sklearn/utils/_estimator_html_repr.css +++ b/sklearn/utils/_estimator_html_repr.css @@ -109,7 +109,6 @@ } #$id div.sk-item { position: relative; - z-index: 1; } #$id div.sk-parallel { display: flex; @@ -211,9 +210,10 @@ a.sk-estimator-doc-link { width: 1em; color: cornflowerblue; text-decoration: none; + margin-left: 1ex; } -a.sk-estimator-doc-link:hover { +#sk-container-id-1 div.sk-estimator:hover a.sk-estimator-doc-link:hover, a.sk-estimator-doc-link:hover { background-color: cornflowerblue; color: white; text-decoration: none; @@ -221,7 +221,7 @@ a.sk-estimator-doc-link:hover { a.sk-estimator-doc-link span { display: none; - z-index: 2; + z-index: 200; position: absolute; background: #eff5ff; color: black; @@ -231,10 +231,24 @@ a.sk-estimator-doc-link span { border: .5pt solid cornflowerblue; right: .2ex; box-shadow: 2pt 2pt 4pt #999; - max-width: 17ex; + max-width: 30ex; + width: min-content; } a.sk-estimator-doc-link:hover span { display: block; } +#sk-container-id-1 div.sk-estimator a.sk-estimator-doc-link { + color: #afc9e0; + border: 1pt solid #afc9e077; + background-color: #f0f8ff; +} + +#sk-container-id-1 div.sk-estimator:hover a.sk-estimator-doc-link { + background-color: white; + border: cornflowerblue 1pt solid; + color: cornflowerblue; +} + +