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

Change styles for focused Select #4728

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1113,12 +1113,14 @@ body {
}

&.vs--open .vs__dropdown-toggle {
border-color: var(--color-primary-element);
outline: 2px solid var(--color-main-background);
border-color: var(--color-main-text);
border-bottom-color: transparent;
}

&:not(.vs--disabled, .vs--open) .vs__dropdown-toggle:hover {
border-color: var(--color-primary-element);
outline: 2px solid var(--color-main-background);
border-color: var(--color-main-text);
}

&.vs--disabled {
Expand Down Expand Up @@ -1149,7 +1151,7 @@ body {
.vs__dropdown-toggle {
border-radius: 0 0 var(--vs-border-radius) var(--vs-border-radius);
border-top-color: transparent;
border-bottom-color: var(--color-primary-element);
border-bottom-color: var(--color-main-text);
}
}
}
Expand Down Expand Up @@ -1182,8 +1184,10 @@ body {
}

.vs__dropdown-menu {
border-color: var(--color-primary-element) !important;
border-color: var(--color-main-text) !important;
outline: 2px solid var(--color-main-background);
Copy link
Contributor

Choose a reason for hiding this comment

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

This outline adds a not so nice gap between the select toggle and the dropdown-menu. But I am not sure we can fix this.
grafik

More obvious with adjusted outline color
grafik

@susnux Any idea here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

well, without this outline it looks odd too like from your video:

After.mp4

I think it is better to keep outline. And all other improvements we can do after a11y certification

Copy link
Contributor

Choose a reason for hiding this comment

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

well, without this outline it looks odd too like from your video:

That's unfortunately true. One could fix it with an additional container around the dropdown and some CSS including a margin-top: -2px;, but that would require adjusting @nextcloud/vue-select which is out out scope here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the vertical position of the drop down needs to be changed. But not sure this is possible without changing the vue-select

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the vertical position of the drop down needs to be changed. But not sure this is possible without changing the vue-select

I tested this (manually). It won't help, since both elements, the trigger and the dropdown, have an outline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

=(
could we merge this pr and improve left things in next future?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, i will merge it now, got enough approves

padding: 4px !important;
JuliaKirschenheuter marked this conversation as resolved.
Show resolved Hide resolved
box-shadow: none;

&--floating {
/* Fallback styles overidden by programmatically set inline styles */
Expand All @@ -1196,7 +1200,6 @@ body {
border-radius: var(--vs-border-radius) var(--vs-border-radius) 0 0 !important;
border-top-style: var(--vs-border-style) !important;
border-bottom-style: none !important;
box-shadow: 0px -1px 1px 0px var(--color-box-shadow) !important;
}
}

Expand Down
Loading