mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #35561 <img width="647" height="655" alt="Screenshot 2026-02-13 at 4 24 57 PM" src="https://github.com/user-attachments/assets/b191f8bb-e6b7-4f3d-8819-eccf23a408f8" /> - Spot checked all relevant instances of `InputField` (`type="textarea" and `enableCopy`) - [x] Changes file added for user-visible changes in `changes/` - [x] QA'd all new/changed functionality manually
128 lines
2.5 KiB
SCSS
128 lines
2.5 KiB
SCSS
.input-field {
|
|
line-height: 1.5;
|
|
background-color: $core-fleet-white;
|
|
border: solid 1px $ui-fleet-black-10;
|
|
border-radius: $border-radius;
|
|
font-size: $x-small;
|
|
padding: $pad-small $pad-medium;
|
|
color: $core-fleet-blue;
|
|
font-family: "Inter", sans-serif;
|
|
box-sizing: border-box;
|
|
height: 36px;
|
|
transition: border-color 100ms;
|
|
width: 100%;
|
|
|
|
&::placeholder {
|
|
color: $ui-fleet-black-50;
|
|
}
|
|
|
|
&:hover:not(.input-field--read-only) {
|
|
box-shadow: none;
|
|
border: 1px solid $ui-fleet-black-75-over;
|
|
}
|
|
|
|
&:active:not(.input-field--read-only),
|
|
&:focus:not(.input-field--read-only),
|
|
&:focus-visible:not(.input-field--read-only) {
|
|
box-shadow: none;
|
|
outline: 0;
|
|
border: 1px solid $ui-fleet-black-75-down;
|
|
}
|
|
|
|
&--disabled {
|
|
color: $ui-fleet-black-50;
|
|
|
|
.form-field__label,
|
|
.form-field__help-text {
|
|
color: $ui-fleet-black-50;
|
|
}
|
|
}
|
|
|
|
&--error {
|
|
color: $core-vibrant-red;
|
|
border: 1px solid $core-vibrant-red;
|
|
box-sizing: border-box;
|
|
border-radius: $border-radius;
|
|
|
|
&:focus {
|
|
border-color: $ui-error;
|
|
background-color: $core-fleet-white;
|
|
color: $core-fleet-black;
|
|
}
|
|
}
|
|
|
|
&__textarea {
|
|
min-height: 100px;
|
|
min-width: 100%;
|
|
max-width: 100%;
|
|
display: block;
|
|
}
|
|
|
|
&__label {
|
|
display: block;
|
|
font-size: $medium;
|
|
font-weight: $regular;
|
|
color: $core-fleet-black;
|
|
margin-bottom: $pad-xsmall;
|
|
|
|
&--error {
|
|
font-weight: $bold;
|
|
color: $ui-error;
|
|
}
|
|
}
|
|
|
|
&__wrapper {
|
|
margin-bottom: $pad-medium;
|
|
}
|
|
|
|
&__help-text {
|
|
font-size: $x-small;
|
|
font-weight: $regular;
|
|
line-height: 1.57;
|
|
letter-spacing: 1px;
|
|
color: $core-fleet-blue;
|
|
|
|
code {
|
|
color: $core-vibrant-blue;
|
|
background-color: $ui-gray;
|
|
padding: $pad-xxsmall;
|
|
font-family: "SourceCodePro", $monospace;
|
|
}
|
|
}
|
|
|
|
&__copy-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: $pad-xsmall;
|
|
position: absolute;
|
|
top: 3px; // vertically center
|
|
right: 0;
|
|
margin: 1px 4px;
|
|
background-color: $core-fleet-white;
|
|
|
|
&__text-area {
|
|
top: -30px;
|
|
}
|
|
}
|
|
|
|
&__input-container.copy-enabled {
|
|
position: relative;
|
|
|
|
.input-field {
|
|
padding-right: 35px; // horizontal scroll of long inputs will not be hidden by copy button
|
|
}
|
|
}
|
|
|
|
&__copied-confirmation {
|
|
@include copy-message;
|
|
}
|
|
|
|
&__copied-confirmation-outside {
|
|
margin-left: -88px;
|
|
}
|
|
}
|
|
|
|
// Removes arrows on Firefox number fields
|
|
input[type="number"] {
|
|
-moz-appearance: textfield;
|
|
}
|