Skip to content

Improve style of selected item in filetree #398

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

Merged
merged 4 commits into from
Jul 1, 2023
Merged

Conversation

sir-kokabi
Copy link
Contributor

I've changed the CSS of the filetree component to make the selected item stand out more from the background color. This helps users see and find the selected item better, especially if they have trouble with colors or vision.

@vercel
Copy link

vercel bot commented Jun 2, 2023

@sir-kokabi is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jun 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
learn-svelte-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2023 7:11pm

Comment on lines 194 to 210
[aria-current='true']::after {
content: '';
position: absolute;
width: 1rem;
height: 1rem;
top: 0.3rem;
right: calc(-0.6rem - 2px);
background-color: var(--sk-back-3);
border: 1px solid var(--sk-back-4);
transform: translate(0, 0.2rem) rotate(45deg);
z-index: 2;
}

[aria-current='true']:has(:focus-visible)::after,
:global(.mobile-filetree) [aria-current='true']::after {
display: none;
}
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't remove this - this adds the indented caret next to the selected file
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have restored this section, but I believe the small arrow here is unnecessary. It is similar to making a menu item both bold and colorized.

@@ -188,24 +188,7 @@
}

[aria-current='true'] {
color: var(--prime);
color: hsl(15, 100%, 50%);
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the root issue here is that the --prime variable no longer exists - I think we should use --sk-theme-1 instead of a hard-coded value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've change color to --sk-theme-1.

@geoffrich geoffrich merged commit b3b1666 into sveltejs:main Jul 1, 2023
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