Only add text-align on p elements

This commit is contained in:
Jackson Harper
2023-04-11 11:59:18 +08:00
parent 22e0a0cbe4
commit 99d3efed51
2 changed files with 2 additions and 6 deletions

View File

@ -164,7 +164,6 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
const updateHighlightMode = (event: UpdateHighlightModeEvent) => {
const isEnabled = event.enableHighlightOnRelease === 'on'
console.log('setting highlight on release: ', isEnabled)
setHighlightOnRelease(isEnabled)
}
@ -216,7 +215,6 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
const handleThemeChange = async (event: UpdateThemeEvent) => {
const newTheme = event.themeName
console.log('handling theme change: ', newTheme)
if (newTheme) {
updateTheme(newTheme)
}
@ -236,7 +234,6 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
}
const updateJustifyText = (event: UpdateJustifyText) => {
console.log('justify', event.justifyText)
setJustifyText(event.justifyText ?? false)
}
@ -354,9 +351,7 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
minHeight: '100vh',
maxWidth: `${styles.maxWidthPercentage ?? 100}%`,
background: theme.colors.readerBg.toString(),
'.article-inner-css': {
textAlign: justifyText ? 'justify' : 'start',
},
'--text-align': justifyText ? 'justify' : 'start',
'--text-font-family': styles.fontFamily,
'--text-font-size': `${styles.fontSize}px`,
'--line-height': `${styles.lineHeight}%`,

View File

@ -93,6 +93,7 @@ on smaller screens we display the note icon
font-weight: normal;
color: var(--font-color);
text-align: var(--text-align);
display: block;
margin-block-start: 1em;