Open
Conversation
Member
|
cc: @Olipro |
Usage: npm run android-png-icons -- <icon_name.svg> [new_color]
8ce6d41 to
7865dff
Compare
Contributor
|
👋 Thanks for Submitting! This PR is available for preview at the link below. ✅ PR tip preview: https://1184.pr.nala.bravesoftware.com/ - ./tokens/css/variables-android.old.css: 7390 bytes
+ ./tokens/css/variables-android.css: 7390 bytes
---
- ./tokens/css/variables-browser.old.css: 6644 bytes
+ ./tokens/css/variables-browser.css: 6644 bytes
---
- ./tokens/css/variables-ios.old.css: 8180 bytes
+ ./tokens/css/variables-ios.css: 8180 bytes
---
- ./tokens/css/variables-marketing.old.css: 13501 bytes
+ ./tokens/css/variables-marketing.css: 13501 bytes
---
- ./tokens/css/variables-news.old.css: 526 bytes
+ ./tokens/css/variables-news.css: 526 bytes
---
- ./tokens/css/variables-newtab.old.css: 1933 bytes
+ ./tokens/css/variables-newtab.css: 1933 bytes
---
- ./tokens/css/variables-search.old.css: 2409 bytes
+ ./tokens/css/variables-search.css: 2409 bytes
---
- ./tokens/css/variables-web3.old.css: 893 bytes
+ ./tokens/css/variables-web3.css: 893 bytes
---
- ./tokens/css/variables.old.css: 124825 bytes
+ ./tokens/css/variables.css: 124825 bytes
Variables Diff: variables-android.diff--- ./tokens/css/variables-android.old.css 2025-09-10 12:03:15.177357019 +0000
+++ ./tokens/css/variables-android.css 2025-09-10 12:02:38.317892103 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-browser.diff--- ./tokens/css/variables-browser.old.css 2025-09-10 12:03:15.588362169 +0000
+++ ./tokens/css/variables-browser.css 2025-09-10 12:02:38.306891960 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-ios.diff--- ./tokens/css/variables-ios.old.css 2025-09-10 12:03:15.821365084 +0000
+++ ./tokens/css/variables-ios.css 2025-09-10 12:02:38.332892299 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-marketing.diff--- ./tokens/css/variables-marketing.old.css 2025-09-10 12:03:16.067368167 +0000
+++ ./tokens/css/variables-marketing.css 2025-09-10 12:02:38.349892520 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-news.diff--- ./tokens/css/variables-news.old.css 2025-09-10 12:03:16.307371174 +0000
+++ ./tokens/css/variables-news.css 2025-09-10 12:02:38.382892951 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-newtab.diff--- ./tokens/css/variables-newtab.old.css 2025-09-10 12:03:16.522373868 +0000
+++ ./tokens/css/variables-newtab.css 2025-09-10 12:02:38.389893042 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-search.diff--- ./tokens/css/variables-search.old.css 2025-09-10 12:03:16.729376459 +0000
+++ ./tokens/css/variables-search.css 2025-09-10 12:02:38.377892886 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
Variables Diff: variables-web3.diff--- ./tokens/css/variables-web3.old.css 2025-09-10 12:03:16.842377876 +0000
+++ ./tokens/css/variables-web3.css 2025-09-10 12:02:38.393893094 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
@media (prefers-color-scheme: light) {
Variables Diff: variables.diff--- ./tokens/css/variables.old.css 2025-09-10 12:03:17.181382124 +0000
+++ ./tokens/css/variables.css 2025-09-10 12:02:38.177890277 +0000
@@ -1,6 +1,6 @@
/**
* Do not edit directly
- * Generated on Mon Sep 08 2025 21:39:49 GMT+0000 (Coordinated Universal Time)
+ * Generated on Wed Sep 10 2025 12:02:38 GMT+0000 (Coordinated Universal Time)
*/
:root {
|
| import path from 'path' | ||
| import sharp from 'sharp' | ||
|
|
||
| const ICONS_FOLDER = 'icons/' |
Collaborator
There was a problem hiding this comment.
Hey, so this will only resolve when the script is run from the root dir of leo - I think the other scripts get away with this 'cause they're always run as part of the prepare script, but yours will end up being run by a target in brave-core.
We should make sure this path is relative to this script, rather than the CWD:
// something like this, I think
const filename = fileURLToPath(import.meta.url)
const dirname = path.dirname(filename)
const iconsFolder = path.join(dirname, '..', '..', 'icons')
kdenhartog
approved these changes
Sep 18, 2025
thypon
approved these changes
Nov 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This repository has all icons set in svg format.
Now there is already
android-iconscommand which is applied duringbuildcommand and it generates Android xml drawable.The moment here that Chromium still has bunch of icons which are still png bitmaps. If we need to replace them with own images, we should use also the same format to avoid bunch of direct gn/gni patches.
This PR adds command
android-png-iconswhich converts svg into pngs ofxxxhdpi/xxhdpi/xhdpi/hdpi/mdpiresolutions.Example
generates these files ready to replace the Chromium's pngs