mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-11-26 07:46:06 -05:00
fix unnoticeable background color bug in dark mode
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
background-color: var(--code-background);
|
||||
border: 1px solid var(--kinda-light);
|
||||
border-radius: var(--rounded-edge-radius);
|
||||
|
||||
/* light-dark theme switch fading */
|
||||
transition: background 0.25s ease, border 0.25s ease;
|
||||
}
|
||||
@@ -32,6 +33,7 @@
|
||||
border: 1px solid var(--kinda-light);
|
||||
border-top-right-radius: var(--rounded-edge-radius);
|
||||
border-end-start-radius: var(--rounded-edge-radius);
|
||||
|
||||
/* light-dark theme switch fading */
|
||||
transition: background 0.25s ease, border 0.25s ease;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import classNames from "classnames";
|
||||
import CopyButton from "../CopyButton/CopyButton";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import type { HTMLAttributes } from "react";
|
||||
|
||||
import styles from "./CodeBlock.module.css";
|
||||
|
||||
type Props = PropsWithChildren<{
|
||||
className?: string;
|
||||
}>;
|
||||
type Props = HTMLAttributes<HTMLElement>;
|
||||
|
||||
const CodeBlock = ({ children, className, ...rest }: Props) => {
|
||||
if (className?.split(" ").includes("code-highlight")) {
|
||||
|
||||
Reference in New Issue
Block a user