Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup bg on body #232

Merged

Conversation

Copy link

vercel bot commented Jan 27, 2024

@choeqq is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.

@emilkowalski
Copy link
Owner

We need to use the reset function instead of set. What if the user had a different background color set initially? That's what the reset function accounts for.

@choeqq
Copy link
Contributor Author

choeqq commented Jan 29, 2024

this solution seems little hacky, I set up bg to '' initially, to save it in cache, so when using reset we can get those from that cache, please let me know WDYT about that 🤔

@emilkowalski

@emilkowalski
Copy link
Owner

emilkowalski commented Jan 30, 2024

this solution seems little hacky, I set up bg to '' initially, to save it in cache, so when using reset we can get those from that cache, please let me know WDYT about that 🤔

We can do something like document.body.style.backgroundColor || document.body.style.background instead of ''

@choeqq
Copy link
Contributor Author

choeqq commented Jan 30, 2024

right, that's better, just pushed the commit

@emilkowalski emilkowalski merged commit c5c4579 into emilkowalski:main Jan 31, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants