Skip to content

fix: About page uses theme background and text colors (fixes white bottom half in dark/high-contrast mode) #3563 #3571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 67 additions & 10 deletions client/modules/About/About.styles.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
import styled from 'styled-components';
import styled, { createGlobalStyle } from 'styled-components';
import { remSize, prop } from '../../theme';

// 1. Global style for the full page background
export const GlobalStyle = createGlobalStyle`
html, body, #root {
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};
min-height: 100vh;
width: 100vw;
margin: 0;
padding: 0;
transition: background-color 0.3s, color 0.3s;
font-family: inherit;
}
`;

// 2. Page Content wrapper
export const AboutPageContent = styled.div`
margin: ${remSize(42)} ${remSize(295)};
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};
min-height: 100vh;

@media (max-width: 1279px) {
margin: ${remSize(20)};
Expand All @@ -12,10 +30,15 @@ export const AboutPageContent = styled.div`
}
`;

// 3. Intro section
export const Intro = styled.div`
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& h1 {
font-size: ${remSize(32)};
font-weight: 700;
color: ${prop('primaryTextColor')};
}

& a {
Expand All @@ -26,38 +49,40 @@ export const Intro = styled.div`
align-items: center;
width: ${remSize(110)};
justify-content: space-evenly;
color: ${prop('primaryTextColor')};
background-color: ${prop('backgroundColor')};

&:hover {
color: ${prop('Button.primary.default.background')};
background-color: ${prop('Button.primary.hover.background')};
border-color: ${prop('Button.primary.hover.border')};
text-decoration: none;

& svg {
& path {
fill: ${prop('Button.primary.default.background')};
}
svg path {
fill: ${prop('Button.primary.default.background')};
}
}
}
`;

// 4. Intro Headline
export const IntroHeadline = styled.div`
display: flex;
align-items: center;
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& div {
height: 100%;
align-items: center;
font-weight: 550;
font-size: ${remSize(24)};
margin: ${remSize(24)};
color: ${prop('primaryTextColor')};
}

& svg {
& path {
fill: ${prop('logoColor')};
}
& svg path {
fill: ${prop('logoColor')};
}

@media (max-width: 769px) {
Expand All @@ -70,62 +95,79 @@ export const IntroHeadline = styled.div`
}
`;

// 5. Intro Description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these comments to maintain consistency with the overall code.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok @yugalkaushik sir I have removed comment and running test locally. will update PR soon.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yugalkaushik sir, I have done everything now please review my PR and merge it if everything goes well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to address me with Sir. I'm just a contributor.

export const IntroDescription = styled.div`
line-height: ${remSize(27)};
font-size: ${remSize(16)};
margin: ${remSize(24)} 0;
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

p {
margin-bottom: ${remSize(24)};
color: ${prop('primaryTextColor')};
}
`;

// 6. Section Wrapper
export const Section = styled.div`
margin: ${remSize(50)} 0;
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& h2 {
font-size: ${remSize(24)};
padding-bottom: ${remSize(30)};
font-weight: 600;
color: ${prop('primaryTextColor')};
}

@media (max-width: 769px) {
display: grid;
}
`;

// 7. SectionContainer
export const SectionContainer = styled.div`
display: flex;
justify-content: row;
padding-top: 0;
font-size: ${remSize(16)};
width: 100%;
flex-wrap: wrap;
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

@media (max-width: 769px) {
display: grid;
}
`;

// 8. SectionItem
export const SectionItem = styled.div`
width: 33%;
display: flex;
line-height: ${remSize(19.5)};
font-size: ${remSize(14)};
padding: 0 ${remSize(30)} ${remSize(30)} 0;
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& p {
margin-top: ${remSize(7)};
color: ${prop('primaryTextColor')};
}

& a {
font-weight: 700;
font-size: ${remSize(16)};
text-decoration: underline;
color: ${prop('primaryTextColor')};

&:hover {
text-decoration: underline;
text-decoration-thickness: 0.1em;
color: ${prop('primaryTextColor')};
}
}

Expand All @@ -149,39 +191,49 @@ export const SectionItem = styled.div`
}
`;

// 9. Contact Section
export const Contact = styled.div`
margin-bottom: ${remSize(50)};
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& h2 {
font-size: ${remSize(24)};
font-weight: 600;
color: ${prop('primaryTextColor')};
}

& div {
display: flex;
width: 100%;
margin: ${remSize(20)} 0;
font-size: ${remSize(16)};
color: ${prop('primaryTextColor')};
}
`;

// 10. ContactTitle
export const ContactTitle = styled.p`
width: 50%;
color: ${prop('primaryTextColor')};

@media (max-width: 769px) {
width: 30%;
}
`;

// 11. ContactHandles
export const ContactHandles = styled.p`
width: 50%;
color: ${prop('primaryTextColor')};

& a {
color: ${prop('logoColor')};
text-decoration: underline;

&:hover {
text-decoration: underline;
color: ${prop('logoColor')};
}
}

Expand All @@ -190,11 +242,14 @@ export const ContactHandles = styled.p`
}
`;

// 12. Footer
export const Footer = styled.div`
border-top: 0.1rem dashed;
border-top: 0.1rem dashed ${prop('primaryTextColor')};
padding: 0 ${remSize(20)} ${remSize(70)} 0;
width: 100%;
font-size: ${remSize(16)};
background-color: ${prop('backgroundColor')};
color: ${prop('primaryTextColor')};

& div {
display: flex;
Expand All @@ -210,11 +265,13 @@ export const Footer = styled.div`
&:hover {
text-decoration: underline;
text-decoration-thickness: 0.1em;
color: ${prop('logoColor')};
}
}

& p {
padding: ${remSize(20)} 9.5% 0 0;
color: ${prop('primaryTextColor')};
}

@media (max-width: 770px) {
Expand Down
6 changes: 5 additions & 1 deletion client/modules/About/pages/About.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';

import {
GlobalStyle,
AboutPageContent,
Intro,
IntroHeadline,
Expand All @@ -20,6 +21,7 @@ import {
} from '../About.styles';

import { ContactSectionLinks, AboutSectionInfo } from '../statics/aboutData';

import Nav from '../../IDE/components/Header/Nav';
import RootPage from '../../../components/RootPage';
import packageData from '../../../../package.json';
Expand Down Expand Up @@ -57,8 +59,10 @@ const About = () => {

return (
<RootPage>
<GlobalStyle />

<Helmet>
<title> {t('About.TitleHelmet')} </title>
<title>{t('About.TitleHelmet')}</title>
</Helmet>

<Nav layout="dashboard" />
Expand Down