Skip to content

Tooltips on android by vftdan

Screenshot of Tooltips on android

Details

Authorvftdan

LicenseCC Zero

Category*

Created

Updated

Size993 B

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Implement title attribute display as a tooltip on mobile devices on hover by using ::after pseudoelement.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name Tooltips on android
@author vftdan
@namespace vftdan
@version 1.0.0
@description Implement title attribute display as a tooltip on mobile devices on hover by using ::after pseudoelement.
@preprocessor uso
@var color tooltip_bg "Tooltip background" #ffd4c9
@var color tooltip_fg "Tooltip text" #000000
@var text tooltip_border "Tooltip border style" "1px solid black"
@var text tooltip_b_radius "Tooltip corner rounding" "2px"
@var text tooltip_padding "Tooltip padding" "1px"
@var text tooltip_opacity "Tooltip opacity" "100%"
==/UserStyle== */

@-moz-document regexp(".*") {
    [title]:hover::after {
        display: inline;
        position: absolute;
        background: /*[[tooltip_bg]]*/;
        color: /*[[tooltip_fg]]*/;
        border: /*[[tooltip_border]]*/;
        border-radius: /*[[tooltip_b_radius]]*/;
        padding: /*[[tooltip_padding]]*/;
        opacity: /*[[tooltip_opacity]]*/;
        content: attr(title);
    }
}

Reviews

No reviews yet.