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

[next] NcSelect: make same height and color as NcTextField #5864

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/components/NcInputField/NcInputField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ export default {
padding-block: 0;
}

&::placeholder {
color: var(--color-text-maxcontrast);
}

&:active:not([disabled]),
&:hover:not([disabled]),
&:focus:not([disabled]) {
Expand Down
17 changes: 12 additions & 5 deletions src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1181,15 +1181,16 @@ body {
/* Override default vue-select styles */
min-height: $clickable-area;
min-width: 260px;
margin: 0;
margin: 0 0 var(--default-grid-baseline);

.select__label {
display: block;
margin-bottom: 2px;
}

.vs__selected {
height: 32px;
height: calc(var(--default-clickable-area) - var(--default-grid-baseline));
margin: calc(var(--default-grid-baseline) / 2);
padding: 0 8px 0 12px;
border-radius: 18px !important;
background: var(--color-primary-element-light);
Expand All @@ -1198,10 +1199,15 @@ body {

.vs__search {
text-overflow: ellipsis;
color: var(--color-main-text);

&::placeholder {
color: var(--color-text-maxcontrast);
}
}

.vs__search, .vs__search:focus {
margin: 2px 0 0;
margin: 0;
}

.vs__dropdown-toggle {
Expand Down Expand Up @@ -1267,12 +1273,13 @@ body {

.vs__selected-options {
// If search is hidden, ensure that the height of the search is the same
min-height: 40px; // 36px search height + 4px search margin
min-height: var(--default-clickable-area);

// Hide search from dom if unused to prevent unneeded flex wrap
.vs__selected ~ .vs__search[readonly] {
position: absolute;
}
padding: 0 5px;
}

&.vs--single {
Expand Down Expand Up @@ -1336,6 +1343,6 @@ body {

// Selected users require slightly different padding
.user-select .vs__selected {
padding: 0 2px !important;
padding: 0 5px !important;
}
</style>
Loading