You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure this can be made but would be great if the user will be able to see the Profilator through its color scheme and not just black.
Limitations
This actually will NOT change based by GitHub color set, because there isn't a way to detect how it's set, instead, it will be made by looking at user preferred color scheme.
How will be developed
The color of the border and the background will be changed using CSS and looking for preferred color scheme. (I don't know if this can be actually made because of SVG. If can't be made, the fallback will be to change the SVG background color to transparent to respect user GitHub theme, but in this way the border will be kept in a black style)
If a "forceScheme" URL parameter is passed, will be applied the theme (dark or light) manually choosen
All the URL parameter logic will be passed into the SVG through the use of Replacer.
The text was updated successfully, but these errors were encountered:
You should probably be able to use a CSS media query inside the SVG to accomplish this. See this link to a Stackoverflow answer that shows a media query that changes style based on light vs dark mode: https://stackoverflow.com/a/67190894/16644458.
I have not tried this, so cannot confirm directly that it works. There's a bit of discussion on that Stackoverflow answer on whether it will work if the SVG is used as an image in an <img> tag, but the consensus appears to be that it works there.
So the general pattern is:
<svgxmlns="http://www.w3.org/2000/svg">
<style>
<!-- style elements for light mode goes here -->@media (prefers-color-scheme: dark) { <!-- style elements for dark mode goes here --> } </style> <!-- Rest of SVG goes here --></svg>
I'm not sure this can be made but would be great if the user will be able to see the Profilator through its color scheme and not just black.
Limitations
This actually will NOT change based by GitHub color set, because there isn't a way to detect how it's set, instead, it will be made by looking at user preferred color scheme.
How will be developed
The text was updated successfully, but these errors were encountered: