Mostly removing div
elements in favour of more specific containers such as section
. The hoverable content has also been removed in favour of a details
element.
LEJN3E4QCBMUTQQKGKNHHAO6ER7R76SXEKBL46QAWZ63D3QRFLVQC
el::div((
match supported_type_description {
ArgType::String => "string",
ArgType::Other => "other",
},
el::div("placeholder content").attr("class", "hover_content"),
))
.attr("class", "hoverable")
el::span(match supported_type_description {
ArgType::String => "string",
ArgType::Other => "other",
})
fn documentation(arg: &Arg) -> impl ViewSequence<Arg> {
if let Some(short_help) = arg.get_help() {
Some(el::details((
el::summary(short_help.to_string()),
arg.get_long_help()
.map(ToString::to_string)
.unwrap_or_default()
.strip_prefix(&short_help.to_string())
.unwrap_or("No description provided")
.to_string(),
)))
} else {
None
}
}
.hoverable {
position: relative;
display: inline-block;
padding-bottom: 5px;
border-bottom: 2px dashed black;
}
.hoverable .hover_content {
display: none;
visibility: hidden;
position: absolute;
left: 125%;
top: 0%;
}
.hoverable:hover .hover_content {
display: block;
visibility: visible;
}