Fixed opacity influence on tooltips

This commit is contained in:
2018-04-18 14:34:33 +02:00
parent 2302dbad31
commit d25ad77715
8 changed files with 20 additions and 9 deletions

View File

@ -8,7 +8,7 @@ const dark = {
"hue": "45",
"saturation": "100%",
"text-color": "hsl(0, 0%, 90%)",
"text-color-l": "90%",
"bg-color": "hsl(0, 0%, 18%)",
"link-color": "hsl(var(--hue), var(--saturation), 66%)",
"link-hover-color": "hsl(var(--hue), var(--saturation), 76%)",

View File

@ -92,8 +92,14 @@ export function displayAiringDate(element: HTMLElement, now: Date) {
airingVerb = "aired"
}
element.setAttribute("aria-label", "Episode " + element.dataset.episodeNumber + " " + airingVerb + " " + dayNames[startDate.getDay()] + " from " + startTime + " - " + endTime)
element.classList.add("tip")
let tooltip = "Episode " + element.dataset.episodeNumber + " " + airingVerb + " " + dayNames[startDate.getDay()] + " from " + startTime + " - " + endTime
if(element.classList.contains("no-tip")) {
element.title = tooltip
} else {
element.setAttribute("aria-label", tooltip)
element.classList.add("tip")
}
}
export function displayDate(element: HTMLElement, now: Date) {