fix: Avoid styles getting purged on prod build (#7086)

This commit is contained in:
Pranav Raj S
2023-05-15 19:05:07 -07:00
committed by GitHub
parent a3547c5a1f
commit 3f39b7ad1f
2 changed files with 6 additions and 2 deletions

View File

@@ -28,8 +28,12 @@ body {
}
.heading {
.permalink {
visibility: hidden;
}
&:hover {
a {
.permalink {
visibility: visible;
}
}

View File

@@ -11,7 +11,7 @@ export const getHeadingsfromTheArticle = () => {
const slug = slugifyWithCounter(element.innerText);
element.id = slug;
element.className = 'scroll-mt-24 heading';
element.innerHTML += `<a class="invisible text-slate-600 ml-3" href="#${slug}" title="${element.innerText}" data-turbolinks="false">#</a>`;
element.innerHTML += `<a class="permalink text-slate-600 ml-3" href="#${slug}" title="${element.innerText}" data-turbolinks="false">#</a>`;
rows.push({
slug,
title: element.innerText,