Skip to content
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

chore: Update dark theme logos styling (Fixes #1209) #1213

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 6 additions & 1 deletion docs/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ const FeatureList: FeatureItem[] = [
]

function Feature({ title, Svg, description }: FeatureItem) {
var classVar = styles.featureSvg;
if(Svg === require('@site/static/img/github.svg').default)
{
classVar = styles.featureSvg +" "+ styles.githubLogo;
}
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
<Svg className={classVar} role="img" />
rahulharpal1603 marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
height: 200px;
width: 200px;
}

html[data-theme='dark'] .githubLogo {
fill: #fff;
}
rahulharpal1603 marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 6 additions & 1 deletion docs/src/components/HomepageSponsored/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ const SponsorList: SponsorItem[] = [
]

function Feature({ title, Svg, link }: FeatureItem) {
var classVar = styles.featureSvg;
if(Svg === require('@site/static/img/Algolia-logo.svg').default)
{
classVar = styles.featureSvg +" "+ styles.AlgoliaLogo;
}
return (
<div className={clsx('col col--6')}>
<div className="text--center">
<a href={link} title={title} target="_blank" rel="noreferrer" aria-label={title}>
<Svg className={styles.featureSvg} role="img" />
<Svg className={classVar} role="img"/>
rahulharpal1603 marked this conversation as resolved.
Show resolved Hide resolved
</a>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/HomepageSponsored/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
width: 100%;
}
}

html[data-theme='dark'] .AlgoliaLogo{
fill: #fff;
}
rahulharpal1603 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion docs/static/img/Algolia-logo.svg
Copy link
Member

Choose a reason for hiding this comment

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

Could you please explain why changing the SVG was needed?

Copy link
Contributor Author

@rahulharpal1603 rahulharpal1603 Jul 24, 2024

Choose a reason for hiding this comment

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

Yes, I changed a code inside svg which controlled the fill colour of the logo. That part was preventing the change of fill colour using CSS property: "fill: #000"

So, I removed the following part from it:
<style>.cls-1,.cls-2{fill:#000;}.cls-2{fill-rule:evenodd;}</style>

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.