Skip to content

Commit 8d601c4

Browse files
authored
Merge pull request #24385 from kbhawkey/update-tooltip-bootstrap
update tooltip styling to bootstrap
2 parents f5becdd + be9e8e9 commit 8d601c4

File tree

6 files changed

+26
-69
lines changed

6 files changed

+26
-69
lines changed

assets/scss/_custom.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,3 +552,10 @@ body.td-documentation {
552552
}
553553
}
554554

555+
/* glossary tooltip */
556+
.glossary-tooltip {
557+
display: inline-block;
558+
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
559+
color: black;
560+
text-decoration: none !important;
561+
}

assets/scss/_variables_project.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,16 @@ Add styles or override variables from the theme here. */
1212
@import "tablet";
1313
@import "desktop";
1414

15-
$primary: #3371e3;
15+
$primary: #3371e3;
16+
17+
// tooltip
18+
$tooltip-bg: #555;
19+
$tooltip-arrow-color: $tooltip-bg !default;
20+
$tooltip-arrow-width: 10px !default;
21+
$tooltip-opacity: 1 !default;
22+
$tooltip-color: #fff !default;
23+
$tooltip-max-width: 300px !default;
24+
$tooltip-font-size: 1rem;
25+
$tooltip-padding: 5px 8px;
26+
$tooltip-border-radius: 6px;
27+
$tooltip-font-weight: 400;

config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ offlineSearch = false
155155
[params.pushAssets]
156156
css = [
157157
"callouts",
158-
"styles",
159-
"custom-jekyll/tags"
158+
"styles"
160159
]
161160
js = [
162161
"script"

layouts/partials/css.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
{{- end }}
1515

1616
<link rel="stylesheet" href="{{ "css/feature-states.css" | relURL }}">
17-
<link rel="stylesheet" href="{{ "css/custom-jekyll/tags.css" | relURL }}">
17+
1818
{{- if .Site.Params.announcement }}
1919
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
2020
{{- end }}

layouts/shortcodes/glossary_tooltip.html

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
{{- $glossary_home := "docs/reference/glossary/?all=true" | relLangURL -}}
1515
{{- $external_link := $term_info.Params.full_link | default (printf "%s#term-%s" $glossary_home $id | safeURL ) -}}
1616
{{- $tooltip := $term_info.Params.short_description | markdownify -}}
17-
{{- $tooltip := $tooltip | replaceRE "(?s)<a class='glossary-tooltip'.*?>(.*?)<span class='tooltip-text'>.*</a>" "$1" | plainify -}}
17+
18+
{{- $tooltip := $tooltip | replaceRE "(?s)<a class='glossary-tooltip'.*?>(.*?).*</a>" "$1" | plainify -}}
1819
{{- $tooltip := trim $tooltip " \n" -}}
19-
<a class='glossary-tooltip' href='{{ $external_link }}' target='_blank'>
20-
{{- $text -}}
21-
<span class='tooltip-text'>
22-
{{- $tooltip | safeHTML -}}
23-
</span>
20+
<a class='glossary-tooltip' title='{{- $tooltip | safeHTML -}}' data-toggle='tooltip' data-placement='top' href='{{ $external_link }}' target='_blank' aria-label='{{ $text }}'>
21+
{{- $text -}}
2422
</a>
2523
{{- end -}}
2624
{{- end -}}

static/css/custom-jekyll/tags.css

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)