Skip to content

Commit

Permalink
dark mode styling fixes (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcockbain authored Jan 18, 2021
1 parent 3a6d65c commit 8b57adb
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 15 deletions.
3 changes: 3 additions & 0 deletions src/components/contactForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const StyledForm = styled.form`
border: 2px solid ${props => props.theme.formBorder};
background-color: ${props => props.theme.surface};
color: ${props => props.theme.onBackground};
opacity: ${props => props.theme.textOpacity};
border-radius: 4px;
margin: 8px 0;
}
Expand All @@ -25,12 +26,14 @@ const StyledForm = styled.form`
border: 2px solid ${props => props.theme.formBorder};
background-color: ${props => props.theme.surface};
color: ${props => props.theme.onBackground};
opacity: ${props => props.theme.textOpacity};
border-radius: 4px;
margin: 8px 0;
}
label {
color: ${props => props.theme.onBackground};
opacity: ${props => props.theme.headerOpacity};
}
`

Expand Down
1 change: 1 addition & 0 deletions src/components/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const FooterContainer = styled.div`
width: 100%;
margin-top: 2rem;
color: ${props => props.theme.onBackground};
opacity: ${props => props.theme.headerOpacity};
`

const Footer = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/contact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const FormContainer = styled.div`
border-radius: 8px;
padding: 12px 20px;
color: ${props => props.theme.onPrimary};
background-color: ${props => props.theme.primary};
background-color: ${props => props.theme.button};
&:enabled {
cursor: pointer;
Expand Down
13 changes: 1 addition & 12 deletions src/styles/components/blog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,4 @@
background: #f5f2f0 !important;
color: black;
font-weight: bold;
}

.filename {
background: black;
padding: 0.5rem 1rem 0.75rem;
font-size: 0.8rem;
color: white;
font-weight: bold;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
margin-bottom: -0.8rem;
}
}
15 changes: 13 additions & 2 deletions src/templates/blog-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@ interface Props extends PageRendererProps {
const Date = styled.p`
margin: 0.5rem 0;
`

const BlogContent = styled.div`
margin-top: 1rem;
blockquote {
padding: 20px;
margin: 20px 0;
border: 1px solid ${props => props.theme.formBorder};
border: 1.5px solid ${props => props.theme.formBorder};
border-radius: 3px;
border-left: 4px solid ${props => props.theme.calloutBorder};
Expand All @@ -48,6 +47,18 @@ const BlogContent = styled.div`
blockquote + blockquote {
margin-top: -5px;
}
.filename {
background: black;
padding: 0.5rem 1rem 0.75rem;
font-size: 0.8rem;
color: white;
opacity: ${props => props.theme.headerOpacity};
font-weight: bold;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
margin-bottom: -0.8rem;
}
`

const BlogPostTemplate = (props: Props) => {
Expand Down
1 change: 1 addition & 0 deletions src/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
onPrimary: `#000000`,
onSecondary: `#000000`,
surface: "#1b191f",
button: "#616161",
formBorder: "black",
navbarColor: "#1b191f",
onNavbar: `white`,
Expand Down
1 change: 1 addition & 0 deletions src/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
onPrimary: `#2d2d2d`,
onSecondary: `#000000`,
surface: "fafafa",
button: "#ffffff",
formBorder: "#ccc",
navbarColor: "#fafafa",
onNavbar: `rgba(0, 0, 0, 0.87)`,
Expand Down

0 comments on commit 8b57adb

Please sign in to comment.