Skip to content

Commit

Permalink
Correct title hover for Katex error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Feb 9, 2024
1 parent 9a0671c commit d80d3ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'styles/notion.css'
import 'styles/prism-theme.css'

// nLine specific styles
import 'styles/global.css'
import 'styles/nline.css'

import {
fathomConfig,
Expand Down
8 changes: 6 additions & 2 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ function waitForElm(selector) {
});
}
waitForElm('.katex-error').then((elm) => {
stylesheet = document.styleSheets[0]
stylesheet.insertRule(".katex-error { color: var(--fg-color) !important; }", 0);
Array.from(document.getElementsByClassName('katex-error')).forEach(
elem => {
elem.removeAttribute('title');
elem.removeAttribute('style');
}
);
renderMathInElement(document.body);
});
`
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

This is the repo for hosting nLine's blog that mirrors content from Notion. It automatically fetches from a desiginated page with live changes we make within seconds. It builds off of the great work of the [upstream project](https://github.com/transitive-bullshit/nextjs-notion-starter-kit).

Custom nLine specific style overrides are made in the `global.css` file.
Custom nLine specific style overrides are made in the `nline.css` file.

<details>
<summary>Upstream readme</summary>
Expand Down
1 change: 1 addition & 0 deletions styles/global.css → styles/nline.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ body {

.notion-equation-block {
text-align: center;
overflow: hidden;
}

/* Soften edges of imgs */
Expand Down

0 comments on commit d80d3ff

Please sign in to comment.