question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS files are ignored by webcord

See original GitHub issue

Aknowledgements

  • I have checked that there’s no other issue describing the same or similar problem that I currently have, regardless if it has been closed or open.

  • I can confirm that this is not an issue with the Discord website, but it is a problem specific to the WebCord itself. I have tested if this bug occurs on Chromium/Chrome or any other Chromium-based browser that uses unpatched/upstream Chromium engine.

  • I have tried running the build from the master branch and it does not have any fixes implemented according to my issue.

  • My issue describes one of the unstable and/or not fully implemented features.

  • I have found a workaround to mitigate or temporarily fix this issue in affected releases (please write it in Additional context section below).

Operating System / Platform

🐧️ Linux

Operating system architecture

x64 (64-bit Intel/AMD)

Electron version

v20.0.0-1

Application version

3.7.1.r628.7af952b-1

Bug description

When putting *.theme.css (with “*” being a name) files in the Themes folder of Webcord, they doesn’t load. While they work on another pc with the same webcord version. Webcord keeps the vanilla theme despite the CSS files being in the Themes folder.

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SpacingBat3commented, Oct 30, 2022

Using an empty argument first and then --add-css-theme=, as suggested, spawns a dialog window asking whether to load the theme. However, accepting will not launch WebCord, instead the theme will load when launching WebCord normally afterwards from the launcher/start menu. It seems the argument --add-css-theme= creates a file (binary?) inside the Themes directory with the theme name. Is this the intended behavior?

@Yasand123 Yes, you could even load themes while WebCord is running in the background.

1reaction
SpacingBat3commented, Oct 28, 2022

@Yasand123 I went through the code and find out what’s causing this – looks like the first argument is always ignored and that’s an incompatibility within used polyfill (@pkgjs/parseargs):

https://github.com/pkgjs/parseargs/blob/67749086a6cb216a4896283de200b1f36646afdd/index.js#L69-L70

I guess this should be reported in the upstream. As a workaround, the one could just type absolute gibberish (it’s still interpreted internally by Electron/Chromium/Node, so please take that in mind) as a first argument, like:

./WebCord-x64.AppImage -- --add-css-theme=/home/ws/darkplus.theme.css

It also described why it was still working for me – I used global-side/development Electron builds (unpackaged) and the first argument there is indeed a path to app.asar or project folder.

Good news are that when Electron will move to Node 18, a native API will be used instead and I’ll start to drop the polyfill if I’ll decide to drop support for older Electron releases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Own css file is being ignored - html - Stack Overflow
I would like to integrate two css files in my website but the second css is being ignored. Both files are loaded when...
Read more >
31833 - font-weight CSS property ignored if using @font-face ...
Issue 31833: font-weight CSS property ignored if using @font-face which doesn't specify a bold-face version. Reported by schedule thoma.
Read more >
Ignore already imported files in other CSS files #98 - GitHub
You would import CSS in one file (e.g. global.css) and when you ... it will be ignored since it was already imported inside...
Read more >
Why is my file not being ignored in .gitignore? : r/git - Reddit
I'm trying to ignore main.css and main.css.map My gitignore: node_modules/ main.css main.css.map only main.css.map gets ignored.
Read more >
Discord - ArchWiki
Discord is a proprietary, cross-platform, all-in-one voice and text chat application. Many open-source communities have official Discord ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found