File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 197
197
# $id div.sk-text-repr-fallback {
198
198
display : none;
199
199
}
200
+
201
+ /* For the docs link */
202
+ a .sk-estimator-doc-link {
203
+ float : right;
204
+ font-size : smaller;
205
+ line-height : 1em ;
206
+ font-family : monospace;
207
+ background-color : white;
208
+ border : cornflowerblue 1pt solid;
209
+ border-radius : 1em ;
210
+ height : 1em ;
211
+ width : 1em ;
212
+ color : cornflowerblue;
213
+ text-decoration : none;
214
+ }
215
+
216
+ a .sk-estimator-doc-link : hover {
217
+ background-color : cornflowerblue;
218
+ color : white;
219
+ text-decoration : none;
220
+ }
221
+
222
+ a .sk-estimator-doc-link span {
223
+ display : none;
224
+ z-index : 2 ;
225
+ position : absolute;
226
+ background : # eff5ff ;
227
+ color : black;
228
+ font-weight : normal;
229
+ padding : .5ex ;
230
+ margin : .5ex ;
231
+ border : .5pt solid cornflowerblue;
232
+ right : .2ex ;
233
+ box-shadow : 2pt 2pt 4pt # 999 ;
234
+ max-width : 17ex ;
235
+ }
236
+
237
+ a .sk-estimator-doc-link : hover span {
238
+ display : block;
239
+ }
240
+
Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ def _write_label_html(
95
95
est_id = _ESTIMATOR_ID_COUNTER .get_id ()
96
96
97
97
if True : # check if estimator is sklearn or not
98
- doc_link = f'<a class="estimator_doc_link" href="{ url_link } ">?</a>'
98
+ doc_label = '<span>Online documentation</span>'
99
+ if name is not None :
100
+ doc_label = f'<span>Documentation for { name } </span>'
101
+ doc_link = f'<a class="sk-estimator-doc-link" href="{ url_link } ">?{ doc_label } </a>'
99
102
else : # not sklearn, do not add link to doc
100
103
doc_link = ""
101
104
You can’t perform that action at this time.
0 commit comments