170 lines
4.9 KiB
CSS
170 lines
4.9 KiB
CSS
/*
|
|
Copyright 2019 Adobe. All rights reserved.
|
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License. You may obtain a copy
|
|
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software distributed under
|
|
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
OF ANY KIND, either express or implied. See the License for the specific language
|
|
governing permissions and limitations under the License.
|
|
*/
|
|
|
|
.spectrum-Textfield {
|
|
/* todo: remove with DNA updated */
|
|
--spectrum-textfield-m-validation-icon-color-valid: var(--spectrum-semantic-positive-color-icon);
|
|
}
|
|
|
|
.spectrum-Textfield {
|
|
&:hover {
|
|
.spectrum-Textfield-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-hover);
|
|
box-shadow: none; /* todo: required? */
|
|
|
|
&::placeholder {
|
|
color: var(--spectrum-textfield-m-placeholder-text-color-hover);
|
|
}
|
|
}
|
|
|
|
.spectrum-Textfield-icon {
|
|
color: var(--spectrum-textfield-m-icon-color-hover);
|
|
}
|
|
}
|
|
|
|
&:active {
|
|
.spectrum-Textfield-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-down);
|
|
}
|
|
|
|
.spectrum-Textfield-icon {
|
|
color: var(--spectrum-textfield-m-icon-color-down);
|
|
}
|
|
}
|
|
|
|
&.is-valid {
|
|
.spectrum-Textfield-validationIcon {
|
|
color: var(--spectrum-textfield-m-validation-icon-color-valid);
|
|
}
|
|
}
|
|
|
|
&.is-invalid {
|
|
.spectrum-Textfield-validationIcon {
|
|
color: var(--spectrum-textfield-m-validation-icon-color-error);
|
|
}
|
|
|
|
&:hover {
|
|
.spectrum-Textfield-input {
|
|
border-color: var(--spectrum-textfield-m-border-color-error-hover);
|
|
}
|
|
}
|
|
}
|
|
|
|
&.is-disabled {
|
|
.spectrum-Textfield-validationIcon {
|
|
color: var(--spectrum-textfield-m-validation-icon-color-disabled);
|
|
}
|
|
|
|
.spectrum-Textfield-icon {
|
|
color: var(--spectrum-textfield-m-icon-color-disabled);
|
|
}
|
|
}
|
|
}
|
|
|
|
.spectrum-Textfield-icon {
|
|
color: var(--spectrum-textfield-m-icon-color);
|
|
}
|
|
|
|
.spectrum-Textfield-input {
|
|
background-color: var(--spectrum-textfield-m-background-color);
|
|
border-color: var(--spectrum-textfield-m-border-color);
|
|
color: var(--spectrum-textfield-m-text-color);
|
|
|
|
&::placeholder {
|
|
color: var(--spectrum-textfield-m-placeholder-text-color);
|
|
}
|
|
|
|
.spectrum-Textfield.is-focused &,
|
|
&:focus {
|
|
border-color: var(--spectrum-textfield-m-border-color-down);
|
|
}
|
|
|
|
.spectrum-Textfield.is-keyboardFocused &,
|
|
&:focus-ring {
|
|
border-color: var(--spectrum-textfield-m-border-color-key-focus);
|
|
box-shadow: 0 0 0 1px var(--spectrum-textfield-m-border-color-key-focus);
|
|
}
|
|
|
|
.spectrum-Textfield.is-invalid & {
|
|
border-color: var(--spectrum-textfield-m-border-color-error);
|
|
|
|
.is-keyboardFocused&,
|
|
&:focus-ring {
|
|
border-color: var(--spectrum-textfield-m-border-color-error-key-focus);
|
|
box-shadow: 0 0 0 1px var(--spectrum-textfield-m-border-color-error-key-focus);
|
|
}
|
|
}
|
|
|
|
.spectrum-Textfield.is-disabled &,
|
|
.spectrum-Textfield.is-disabled:hover &,
|
|
:disabled {
|
|
background-color: var(--spectrum-textfield-m-background-color-disabled);
|
|
border-color: var(--spectrum-textfield-m-border-color-disabled);
|
|
color: var(--spectrum-textfield-m-text-color-disabled);
|
|
|
|
/* For safari mobile browser */
|
|
-webkit-text-fill-color: var(--spectrum-textfield-m-text-color-disabled);
|
|
|
|
&::placeholder {
|
|
color: var(--spectrum-textfield-m-placeholder-text-color-disabled);
|
|
}
|
|
}
|
|
}
|
|
|
|
.spectrum-Textfield--quiet {
|
|
.spectrum-Textfield-input {
|
|
background-color: var(--spectrum-textfield-quiet-m-background-color);
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color);
|
|
|
|
:hover& {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-hover);
|
|
}
|
|
|
|
:active& {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-down);
|
|
}
|
|
|
|
.is-focused&,
|
|
&:focus {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-mouse-focus);
|
|
}
|
|
|
|
.is-keyboardFocused&,
|
|
&:focus-ring {
|
|
border-color: var(--spectrum-textfield-m-border-color-key-focus);
|
|
box-shadow: 0 1px 0 var(--spectrum-textfield-m-border-color-key-focus);
|
|
}
|
|
|
|
.is-invalid& {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-error);
|
|
|
|
.is-focused&,
|
|
&:focus {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-error-mouse-focus);
|
|
}
|
|
|
|
.is-keyboardFocused&,
|
|
&:focus-ring {
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-error-key-focus);
|
|
box-shadow: 0 1px 0 var(--spectrum-textfield-quiet-m-border-color-error-key-focus);
|
|
}
|
|
}
|
|
|
|
.is-disabled:hover&,
|
|
.is-disabled&,
|
|
:disabled {
|
|
background-color: var(--spectrum-textfield-quiet-m-background-color-disabled);
|
|
border-color: var(--spectrum-textfield-quiet-m-border-color-disabled);
|
|
}
|
|
}
|
|
}
|