Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 11 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Comment: Prefix --color-* variables into --jetpack-social-logo-color-* CSS variables to avoid name collisions.
1 change: 1 addition & 0 deletions projects/js-packages/components/components/icons/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Path, SVG, G, Polygon } from '@wordpress/components';
import clsx from 'clsx';
import { SocialLogo } from 'social-logos';
import 'social-logos/colors.css';
import styles from './style.module.scss';
import { BaseIconProps } from './types.ts';
import type { ComponentProps, ComponentType, FC, ReactNode } from 'react';
Expand Down
24 changes: 12 additions & 12 deletions projects/js-packages/components/components/icons/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,63 +13,63 @@
fill: gb.$gray-700;

&.bluesky {
fill: var(--color-bluesky);
fill: var(--jetpack-social-logo-color-bluesky);
}

&.facebook {
fill: var(--color-facebook);
fill: var(--jetpack-social-logo-color-facebook);
// Add some specificity to override the border-radius on Jetpack settings page
&:global(.social-logo) {
border-radius: 50%;
}
}

&.twitter {
fill: var(--color-twitter);
fill: var(--jetpack-social-logo-color-twitter);
}

&.linkedin {
fill: var(--color-linkedin);
fill: var(--jetpack-social-logo-color-linkedin);
}

&.tumblr {
fill: var(--color-tumblr);
fill: var(--jetpack-social-logo-color-tumblr);
}

&.google {
fill: var(--color-gplus);
fill: var(--jetpack-social-logo-color-google-plus);
}

&.mastodon {
fill: var(--color-mastodon);
fill: var(--jetpack-social-logo-color-mastodon);
}

&.nextdoor {
fill: var(--color-nextdoor);
fill: var(--jetpack-social-logo-color-nextdoor);
// Add some specificity to override the border-radius on Jetpack settings page
&:global(.social-logo) {
border-radius: 50%;
}
}

&.instagram {
fill: var(--color-instagram);
fill: var(--jetpack-social-logo-color-instagram);
}

&.whatsapp {
fill: var(--color-whatsapp);
fill: var(--jetpack-social-logo-color-whatsapp);
}

&.threads {
fill: var(--color-threads);
fill: var(--jetpack-social-logo-color-threads);

&:global(.social-logo) {
border-radius: 40%;
}
}

&.x {
fill: var(--color-x);
fill: var(--jetpack-social-logo-color-x);
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Comment: Prefix --color-* variables into --jetpack-social-logo-color-* CSS variables to avoid name collisions.
3 changes: 2 additions & 1 deletion projects/js-packages/shared-extension-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"@wordpress/ui": "0.17.0",
"@wordpress/url": "4.50.0",
"clsx": "2.1.1",
"debug": "4.4.3"
"debug": "4.4.3",
"social-logos": "workspace:*"
},
"devDependencies": {
"@automattic/jetpack-webpack-config": "workspace:*",
Expand Down
1 change: 1 addition & 0 deletions projects/js-packages/shared-extension-utils/src/icons.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import colorStudio from '@automattic/color-studio';
import { G, Path, Polygon, Rect, SVG, Circle } from '@wordpress/components';
import clsx from 'clsx';
import 'social-logos/colors.css';

import './icons.scss';

Expand Down
10 changes: 5 additions & 5 deletions projects/js-packages/shared-extension-utils/src/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
fill: gb.$gray-700;

&.is-facebook {
fill: var(--color-facebook);
fill: var(--jetpack-social-logo-color-facebook);
}

&.is-twitter {
fill: var(--color-twitter);
fill: var(--jetpack-social-logo-color-twitter);
}

&.is-linkedin {
fill: var(--color-linkedin);
fill: var(--jetpack-social-logo-color-linkedin);
}

&.is-tumblr {
fill: var(--color-tumblr);
fill: var(--jetpack-social-logo-color-tumblr);
}

&.is-google {
fill: var(--color-gplus);
fill: var(--jetpack-social-logo-color-google-plus);
}
Comment on lines 22 to 24

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

BTW, why do we still have Google+ around? The service was shut down in 2019.

https://en.wikipedia.org/wiki/Google%2B

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah good question. We can create a task to retire it fully (altough I think most of the logic was retired already)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Comment: Prefix --color-* variables into --jetpack-social-logo-color-* CSS variables to avoid name collisions.
48 changes: 24 additions & 24 deletions projects/js-packages/social-logos/src/social-logo-colors.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
:root {
--color-blogger: #ff5722;
--color-bluesky: #1185fe;
--color-eventbrite: #ff8000;
--color-facebook: #0866ff;
--color-godaddy: #5ea95a;
--color-google-plus: #df4a32;
--color-instagram: #d93174;
--color-linkedin: #0976b4;
--color-mastodon: #6364ff;
--color-medium: #12100e;
--color-nextdoor: #8ed500;
--color-pinterest: #cc2127;
--color-print: #f8f8f8;
--color-reddit: #ff4500;
--color-squarespace: #222;
--color-stumbleupon: #eb4924;
--color-substack: #ff6719;
--color-telegram: #08c;
--color-tumblr: #35465c;
--color-twitter: #55acee;
--color-threads: #000;
--color-whatsapp: #43d854;
--color-wix: #faad4d;
--color-x: #000;
--jetpack-social-logo-color-blogger: #ff5722;
--jetpack-social-logo-color-bluesky: #1185fe;
--jetpack-social-logo-color-eventbrite: #ff8000;
--jetpack-social-logo-color-facebook: #0866ff;
--jetpack-social-logo-color-godaddy: #5ea95a;
--jetpack-social-logo-color-google-plus: #df4a32;
--jetpack-social-logo-color-instagram: #d93174;
--jetpack-social-logo-color-linkedin: #0976b4;
--jetpack-social-logo-color-mastodon: #6364ff;
--jetpack-social-logo-color-medium: #12100e;
--jetpack-social-logo-color-nextdoor: #8ed500;
--jetpack-social-logo-color-pinterest: #cc2127;
--jetpack-social-logo-color-print: #f8f8f8;
--jetpack-social-logo-color-reddit: #ff4500;
--jetpack-social-logo-color-squarespace: #222;
--jetpack-social-logo-color-stumbleupon: #eb4924;
--jetpack-social-logo-color-substack: #ff6719;
--jetpack-social-logo-color-telegram: #08c;
--jetpack-social-logo-color-tumblr: #35465c;
--jetpack-social-logo-color-twitter: #55acee;
--jetpack-social-logo-color-threads: #000;
--jetpack-social-logo-color-whatsapp: #43d854;
--jetpack-social-logo-color-wix: #faad4d;
--jetpack-social-logo-color-x: #000;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ConnectionIcon from '../index.tsx';
import '../../../../../../js-packages/social-logos/src/social-logo-colors.css';
import 'social-logos/colors.css';

export default {
title: 'Packages/Publicize/ConnectionIcon',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$whatsapp: #2ab318;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new value is #43d854 instead of #2ab318 is that an intentional change? I see below in the group it also uses #43d854 so maybe this was an odd one out?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The original variable was added in #33074, quite some time ago, so WhatsApp might have since then updated the colours.

Furthermore, in the logos from their logo pack, it's #25d366 🙃. The same colour is used for the background in official click-to-chat buttons.

To me, it looks like the social-logos variable needs updating after this, too?

@use "social-logos/colors.css";

.share-buttons {
display: flex;
Expand Down Expand Up @@ -36,11 +36,11 @@ $whatsapp: #2ab318;
}

.whatsapp {
background-color: $whatsapp;
background-color: var(--jetpack-social-logo-color-whatsapp);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Using shared --jetpack-social-logo-color-whatsapp instead of fixed $whatsapp

}

.facebook {
background-color: var(--color-facebook);
background-color: var(--jetpack-social-logo-color-facebook);
// I hate !important, but social icon has it, so it needs to be overriden
border-radius: var(--jp-border-radius) !important;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Comment: Prefix --color-* variables into --jetpack-social-logo-color-* CSS variables to avoid name collisions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Comment: Prefix --color-* variables into --jetpack-social-logo-color-* CSS variables to avoid name collisions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "social-logos/colors.css";

a.jetpack-sharing-button__button {
color: inherit;
}
Expand Down Expand Up @@ -50,63 +52,63 @@ a.jetpack-sharing-button__button {
color: #fff;

&.share-bluesky {
background: var(--color-bluesky);
background: var(--jetpack-social-logo-color-bluesky);
}

&.share-x {
background: #000;
}
Comment on lines 56 to -58

@simison simison Jul 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Replaced #000 with --jetpack-social-logo-color-x for X.


&.share-print {
background: #c5c2c2;
background: var(--jetpack-social-logo-color-x);
}

&.share-reddit {
background: var(--color-reddit);
background: var(--jetpack-social-logo-color-reddit);
}

&.share-facebook {
background: var(--color-facebook);
background: var(--jetpack-social-logo-color-facebook);
}

&.share-linkedin {
background: var(--color-linkedin);
}

&.share-mail {
background: #c5c2c2;
background: var(--jetpack-social-logo-color-linkedin);
}

&.share-twitter {
background: var(--color-twitter);
background: var(--jetpack-social-logo-color-twitter);
}

&.share-tumblr {
background: var(--color-tumblr);
background: var(--jetpack-social-logo-color-tumblr);
}

&.share-pinterest {
background: var(--color-pinterest);
background: var(--jetpack-social-logo-color-pinterest);
}

&.share-telegram {
background: var(--color-telegram);
background: var(--jetpack-social-logo-color-telegram);
}

&.share-threads {
background: var(--color-threads);
background: var(--jetpack-social-logo-color-threads);
}

&.share-whatsapp {
background: var(--color-whatsapp);
background: var(--jetpack-social-logo-color-whatsapp);
}

&.share-mastodon {
background: var(--color-mastodon);
background: var(--jetpack-social-logo-color-mastodon);
}

&.share-nextdoor {
background: var(--color-nextdoor);
background: var(--jetpack-social-logo-color-nextdoor);
}

&.share-print {
background: #c5c2c2;
}

&.share-mail {
background: #c5c2c2;
Comment on lines +106 to +111

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Simply moved these down to group selectors using tokens from the rest.

}

&.share-share {
Expand Down
Loading