Skip to content

Commit

Permalink
Removed some no longer used styles, added some default letter spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
crismali committed Oct 18, 2023
1 parent 1fc5f83 commit 41986b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
1 change: 1 addition & 0 deletions src/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ html {
font-size: var(--default-font-size);
font-weight: var(--weight-normal);
line-height: 1.5;
letter-spacing: -0.44px;
}

body {
Expand Down
3 changes: 2 additions & 1 deletion src/templates/EmailTemplateComponents/Disclaimer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { CSSProperties, FC } from 'react'
import { EmailComponentProps } from './shared'
import { Colors, Font, Spacing, SpacingCell } from '../styles'
import { Colors, Font, Spacing, SpacingCell, StyleDefaults } from '../styles'
import { useLocalStorageJSON } from 'src/utils/useLocalStorage'
import { EmailBlock } from 'src/ui'

Expand Down Expand Up @@ -41,6 +41,7 @@ export const styles: CSSProperties = {
fontSize: Font.size.tiny,
fontWeight: Font.weight.normal,
lineHeight: Font.lineHeight.default,
letterSpacing: StyleDefaults.inline.fontAndColors.letterSpacing,
margin: 0,
padding: 0,
paddingBottom: Spacing.size.large,
Expand Down
38 changes: 8 additions & 30 deletions src/templates/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,39 +63,17 @@ export const Spacing = {
},
} as const

export const DefaultStyles: CSSProperties = {
...Spacing.layout.paddingHorizontal,
backgroundColor: Colors.white,
color: Colors.black,
fontFamily: Font.family.default,
fontWeight: Font.weight.normal,
fontSize: Font.size.medium,
lineHeight: Font.lineHeight.default,
}

const defaultFontAndColors: CSSProperties = {
backgroundColor: Colors.white,
color: Colors.black,
fontFamily: Font.family.default,
fontWeight: Font.weight.normal,
fontSize: Font.size.medium,
lineHeight: Font.lineHeight.default,
letterSpacing: '-2%',
}

export const StyleDefaults = {
layout: { narrow: 'narrow', wide: 'wide' },
inline: {
fontAndColors: defaultFontAndColors,
},
inlineLayout: {
narrow: {
...Spacing.layout.narrow,
...defaultFontAndColors,
} as CSSProperties,
wide: {
...Spacing.layout.wide,
...defaultFontAndColors,
fontAndColors: {
backgroundColor: Colors.white,
color: Colors.black,
fontFamily: Font.family.default,
fontWeight: Font.weight.normal,
fontSize: Font.size.medium,
lineHeight: Font.lineHeight.default,
letterSpacing: '-0.44px',
} as CSSProperties,
},
} as const
Expand Down

0 comments on commit 41986b0

Please sign in to comment.