Skip to content

Commit

Permalink
more style
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Feb 19, 2025
1 parent c7738d1 commit ebae6f6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion posts/2024-11-17-expectations-disappointment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The other way to react
And often in such situations, you know that something you believe is fiction.

While the rationalist mantra leaves open the door for the story to be false,
most people dont tend to knowingly violate expectations to hurt others.
most people don’t tend to knowingly violate expectations to hurt others.
But if you aren’t in a situation that is so toxic that you can expect that to be the case,
don’t make the situation toxic by expecting the worst, but think “I notice that I am confused …”

Expand Down
24 changes: 22 additions & 2 deletions src/components/markup/MarkupNodeComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ import { Bullet, type Elem, type Node, Type } from '../../markup/MarkupDocument'
import CodeBlock from '../CodeBlock'
import Plotly from '../Plotly'

import type { SystemCssProperties } from '@mui/system'
import type {
CSSPseudoSelectorProps,
CSSSelectorObjectOrCssVariables,
SystemCssProperties,
} from '@mui/system'
import ASTErrorMessage from './nodes/ASTErrorMessage'
import High from './nodes/High'

/** Actual type of `sx`, no idea why the one imported from `@mui/system` doesn’t work */
type SystemStyleObject<Theme extends object = object> =
SystemCssProperties<Theme> &
CSSPseudoSelectorProps<Theme> &
CSSSelectorObjectOrCssVariables<Theme>

const KATEX_SETTINGS: KatexOptions = {
output: 'mathml',
}
Expand Down Expand Up @@ -74,10 +84,20 @@ const MarkupNodeComponentInner: FC<MarkupElementProps> = ({ node, level }) => {
</Typography>
)
case Type.BlockQuote: {
const sx: SystemCssProperties = { marginInlineStart: 5 }
const sx: SystemStyleObject = {
marginInlineStart: 5,
}
if (node.variant === 'epigraph') {
sx.fontStyle = 'italic'
sx.marginInlineEnd = 5
sx['::before'] = {
color: 'color(from currentcolor display-p3 r g b / .3)',
content: 'open-quote',
fontSize: '4em',
lineHeight: '0.1em',
marginRight: '0.25em',
verticalAlign: '-0.4em',
}
}
return (
<Typography component="blockquote" sx={sx}>
Expand Down

0 comments on commit ebae6f6

Please sign in to comment.