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

feat: use different colors on text selection/highlight dark/light mode #338

Conversation

yaroslavhoretskyi
Copy link
Contributor

@yaroslavhoretskyi yaroslavhoretskyi commented May 3, 2024

Light Mode (old):
image
(new)
image

Dark Mode:
image

Copy link
Contributor

@MandyMeindersma MandyMeindersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to see the opacity change, like so:
image

@yaroslavhoretskyi
Copy link
Contributor Author

I love it, I'll add it!

@MandyMeindersma
Copy link
Contributor

Oh sorry @yaroslavhoretskyi I wasn't talking about the colour.

I was talking about the opacity. Like how the "G"s aren't cut off, you know what I mean?

image

image

My guess is that you would have to use a rgb(#,#,#,0.5) method to get it to work but maybe ask around tonight to see if someone else has a better idea.

@dgmouris
Copy link
Collaborator

dgmouris commented May 6, 2024

Sorry I updated this branch while I was reading it!

assets/style.css Outdated
@@ -13,3 +13,16 @@ p + p {
.nuxt-scroll-indicator {
@apply bg-gradient-to-r to-secondary from-blue-700;
}

/* We use this color just one time */
.light {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's easier to use tailwind syntax here, for example:

::selection: {
	@apply bg-[#d4b5d4] dark:bg-primary
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment. I just realized that if we want to have different colors for different modes, we should use something like this.

::selection {
  @apply bg-secondary; // for light mode
}

.dark ::selection {
  @apply bg-primary;; // for dark mode
}

or if we want to use only one color for each mode, we can use your solution.
Let me know what you think about it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yaroslavhoretskyi Ah yes you're right, thanks

@MandyMeindersma
Copy link
Contributor

MandyMeindersma commented May 20, 2024

@yaroslavhoretskyi I wanted to check in to see if you still wanted to give tis a shot :)

If you have any questions, let me know :)

@yaroslavhoretskyi
Copy link
Contributor Author

@MandyMeindersma, thanks for the ping, I just got lost in all the messages in my email.. I'd like to finish.

@MandyMeindersma
Copy link
Contributor

Absolutely! No rush :)

@arashsheyda
Copy link
Collaborator

@yaroslavhoretskyi can you exclude the package.json from the PR? thanks

@MandyMeindersma
Copy link
Contributor

Weird @yaroslavhoretskyi the package files are still showing for me.

It almost looks like the bot is kind of readding stuff since there is a change on that file. I wonder if there is a way to remove all your changes from the file?

Or honestly copy and paste your changes to another branch ahhaha

@MandyMeindersma
Copy link
Contributor

#349

Sorry 😢

@MandyMeindersma MandyMeindersma merged commit ab10439 into devedmonton:main Jun 17, 2024
4 checks passed
@MandyMeindersma
Copy link
Contributor

Thank you so much @yaroslavhoretskyi !!!

Sorry there were bot issues! I have turned off the bot so that won't happen again!

Thank you so much for making the website better!

@MandyMeindersma
Copy link
Contributor

@allcontributors add @yaroslavhoretskyi for code

Copy link
Contributor

@MandyMeindersma

@yaroslavhoretskyi already contributed before to code

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.

4 participants