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] Use variables for input border width #5657

Merged
merged 1 commit into from
May 31, 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
5 changes: 3 additions & 2 deletions src/components/NcInputField/NcInputField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export default {

background-color: var(--color-main-background);
color: var(--color-main-text);
border: 2px solid var(--color-border-maxcontrast);
border: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);
border-radius: var(--border-radius-large);

cursor: pointer;
Expand All @@ -388,7 +388,8 @@ export default {
&:active:not([disabled]),
&:hover:not([disabled]),
&:focus:not([disabled]) {
border-color: 2px solid var(--color-main-text) !important;
border-width: var(--border-width-input-focused, 2px);
border-color: var(--color-main-text) !important;
box-shadow: 0 0 0 2px var(--color-main-background) !important;
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/NcSelect/NcSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ body {

/* Borders */
--vs-border-color: var(--color-border-maxcontrast);
--vs-border-width: 2px;
--vs-border-width: var(--border-width-input, 2px) !important;
--vs-border-style: solid;
--vs-border-radius: var(--border-radius-large);

Expand Down Expand Up @@ -1238,6 +1238,7 @@ body {
}

&.vs--open .vs__dropdown-toggle {
border-width: var(--border-width-input-focused);
outline: 2px solid var(--color-main-background);
border-color: var(--color-main-text);
border-bottom-color: transparent;
Expand Down Expand Up @@ -1312,6 +1313,7 @@ body {
}

.vs__dropdown-menu {
border-width: var(--border-width-input-focused) !important;
border-color: var(--color-main-text) !important;
outline: none !important;
box-shadow:
Expand Down
7 changes: 4 additions & 3 deletions src/components/NcTextArea/NcTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,22 @@ export default {
margin: 0;
padding-inline: 10px 6px; // align with label 8px margin label + 4px padding label - 2px border input
width: 100%;

height: calc(var(--default-clickable-area) * 2);
font-size: var(--default-font-size);
text-overflow: ellipsis;

background-color: var(--color-main-background);
color: var(--color-main-text);
border: 2px solid var(--color-border-maxcontrast);
border: var(--border-width-input, 2px) solid var(--color-border-maxcontrast);
border-radius: var(--border-radius-large);

cursor: pointer;

&:active:not([disabled]),
&:hover:not([disabled]),
&:focus:not([disabled]) {
border-color: 2px solid var(--color-main-text) !important;
border-width: var(--border-width-input-focused, 2px);
border-color: var(--color-main-text);
box-shadow: 0 0 0 2px var(--color-main-background) !important;
}

Expand Down
Loading