Tried to fix code window formatting on light and dark mode#36
Tried to fix code window formatting on light and dark mode#36dineshsutihar merged 2 commits intoStructZ:developfrom
Conversation
dineshsutihar
left a comment
There was a problem hiding this comment.
Change line 61 in content.js to:
injectOrUpdateTranslations(newData, clickedElement, originalWidth, theme);
then it should work
|
Hi! Thank you so much for this fantastic contribution and for the incredibly detailed description. In The fix: That's it! That one change will make the theming work consistently.
This is excellent work. Once you make that small change, this PR will be ready to merge. Thanks again! |
|
Hey @dineshsutihar, thanks a lot for your guidance! 🙌 I’ve fixed the code, and it’s ready to be merged now. |
|
@hemanth5055 Good Work. Let me test it and then we will merge it. |
Description
This PR addresses issue #13.
What I did
prism-light.cssfile for proper light-mode syntax highlighting.content.jsto read the theme fromchrome.storage.sync..light/.dark) to the injected UI’s Shadow DOM container.ui.jsto load the appropriate Prism stylesheet based on the theme.Current status
The code compiles and injects, but the injected UI still doesn’t consistently reflect the saved theme. Sometimes it falls back to default styling.
Request for review
I’d appreciate a review to confirm if I’m:
chrome.storage.synccorrectly from the content script.Sometimes it works :