|
| 1 | +/* |
| 2 | + * Copyright 2021 Adobe. All rights reserved. |
| 3 | + * This file is licensed to you under the Apache License, Version 2.0 (the "License"); |
| 4 | + * you may not use this file except in compliance with the License. You may obtain a copy |
| 5 | + * of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | + * |
| 7 | + * Unless required by applicable law or agreed to in writing, software distributed under |
| 8 | + * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS |
| 9 | + * OF ANY KIND, either express or implied. See the License for the specific language |
| 10 | + * governing permissions and limitations under the License. |
| 11 | + */ |
| 12 | + |
| 13 | +@import '../commons/index.css'; |
| 14 | + |
| 15 | +:root { |
| 16 | + --spectrum-helptext-neutral-texticon-text-size: var(--spectrum-global-dimension-font-size-75); |
| 17 | + --spectrum-helptext-neutral-texticon-icon-gap: var(--spectrum-global-dimension-size-100); |
| 18 | + |
| 19 | + --spectrum-helptext-negative-texticon-icon-padding-top: var(--spectrum-global-dimension-size-40); |
| 20 | + --spectrum-helptext-negative-texticon-icon-padding-bottom: var(--spectrum-global-dimension-size-40); |
| 21 | + |
| 22 | + --spectrum-helptext-neutral-textonly-text-padding-top: var(--spectrum-global-dimension-static-size-50); |
| 23 | + --spectrum-helptext-neutral-textonly-text-transform: none; |
| 24 | + --spectrum-helptext-neutral-textonly-text-letter-spacing: var(--spectrum-global-font-letter-spacing-none); |
| 25 | + |
| 26 | + /* Uses value for DNA variable --spectrum-helptext-l-neutral-textonly-text-padding-bottom, since m variant doesn't exist */ |
| 27 | + --spectrum-helptext-neutral-textonly-text-padding-bottom: var(--spectrum-global-dimension-size-115); |
| 28 | + /* Override: DNA uses --spectrum-alias-component-text-line-height */ |
| 29 | + --spectrum-helptext-neutral-textonly-text-line-height: var(--spectrum-global-font-line-height-small); |
| 30 | +} |
| 31 | + |
| 32 | +.spectrum-HelpText { |
| 33 | + display: flex; |
| 34 | + font-size: var(--spectrum-helptext-neutral-texticon-text-size); |
| 35 | + .spectrum-HelpText-validationIcon { |
| 36 | + margin-inline-end: var(--spectrum-helptext-neutral-texticon-icon-gap); |
| 37 | + padding-block: var(--spectrum-helptext-negative-texticon-icon-padding-top) var(--spectrum-helptext-negative-texticon-icon-padding-bottom); |
| 38 | + flex-shrink: 0; |
| 39 | + } |
| 40 | + .spectrum-HelpText-text { |
| 41 | + /* Not in DNA: make text fill up all horizontal space. */ |
| 42 | + flex: 1; |
| 43 | + |
| 44 | + margin-inline-end: var(--spectrum-helptext-neutral-texticon-icon-gap); |
| 45 | + padding-block: var(--spectrum-helptext-neutral-textonly-text-padding-top) var(--spectrum-helptext-neutral-textonly-text-padding-bottom); |
| 46 | + line-height: var(--spectrum-helptext-neutral-textonly-text-line-height); |
| 47 | + text-transform: var(--spectrum-helptext-neutral-textonly-text-transform); |
| 48 | + letter-spacing: var(--spectrum-helptext-neutral-textonly-text-letter-spacing); |
| 49 | + } |
| 50 | + /* Not in DNA */ |
| 51 | + &.spectrum-HelpText--alignEnd { |
| 52 | + text-align: end; /* Works with labelPosition=top and labelPosition=side */ |
| 53 | + .spectrum-HelpText-text { |
| 54 | + margin-inline-end: 0; |
| 55 | + margin-inline-start: var(--spectrum-helptext-neutral-texticon-icon-gap); |
| 56 | + } |
| 57 | + .spectrum-HelpText-validationIcon { |
| 58 | + margin-inline-end: 0; |
| 59 | + } |
| 60 | + } |
| 61 | +} |
0 commit comments