packages/react-components/react-input/library/docs/Spec-styling.md
@fluentui/react-input: Styling implementation notesInput has multiple size and appearance variants. These tables were created based on the design spec to assist with initial implementation and help ensure everything is handled.
General abbreviations used:
Notes:
spacing.horizontal unless otherwise specified| Style | Application | All |
|---|---|---|
| v-align | root | vertically centered |
| border radius | root (unless underlined) | medium |
| n/a (add later if needed) | xs |
| Style | Application | small | medium | large |
|---|---|---|---|---|
| height | root minHeight | 24px | 32px | 40px |
| left/right padding | root | sNudge | mNudge | m |
| left/right padding in content | input | xxs | xxs | sNudge |
| content size | root, input (doesn't inherit) | caption1 (base.200) | body1 (base.300) | base.400 |
| "icon" size | contentBefore/after > svg | 16Regular | 20Regular | 24Regular |
| spacing within root | root display: flex, flex gap | xxs | xxs | sNudge |
Notes:
:after)TODO Open questions:
:focus-within:before + setting the bottom border color on :focus-within.| Style | Application | All |
|---|---|---|
| content color | input | neutralForeground1 |
| content color disabled | ^ | neutralForegroundDisabled |
| placeholder color | input ::placeholder | neutralForeground4 |
| placeholder color disabled | ^ | neutralForegroundDisabled |
| "icon" color | contentBefore/After | neutralForeground3 |
| "icon" color disabled | ^ | neutralForegroundDisabled |
| background disabled | root, input | transparentBackground |
| border disabled | root | neutralStrokeDisabled |
| n/a (covered by focus indicator) | ||
| in focus indicator | root :focus-within:after | thick compoundBrandStroke |
| in focus indicator pressed | root :after | thick ^Pressed |
| cursor disabled | root, input | not-allowed |
| Style | Application | outline | underline | filledDarker | filledLighter |
|---|---|---|---|---|---|
| shadow | root | none | " | shadow2 | " |
| background | root, input | neutralBackground1 | transparentBackground | neutralBackground3 | neutralBackground1 |
| border | root | neutralStroke1 | none | transparentStroke | " |
| border hover | root :hover | ^Hover | n/a | ^Interactive | " |
| border pressed | root :active | ^^Pressed | n/a | ^ | " |
| border focused | root :focus-within | n/a (neutralStroke1) | n/a | ^ | " |
| borderBottom | root | neutralStrokeAccessible | " | n/a | n/a |
| borderBottom hover | root :hover | ^Hover | " | n/a | n/a |
| borderBottom pressed | TODO (see ? above) | thick ^^Pressed | " | n/a | n/a |
| focus in | focus out | |
|---|---|---|
| apply to | root :focus-within:after | root :after |
| transform | scaleX 0-1 | scaleX 1-0 |
| duration | normal (200ms) | ultraFast (50ms) |
| easing | decelerateMid | accelerateMid |
Bookend implementation has been deferred and will likely be handled in a separate component, but leaving these for reference.
| Style | small | medium | large |
|---|---|---|---|
| v-align | vertically centered | " | " |
| border radius | medium | " | " |
| left/right padding | sNudge | s | m |
| spacing within | xs | " | " |
| Style | filled | brand | transparent |
|---|---|---|---|
| background | neutralBackground6 | brandBackground | transparentBackground |
| content (+icon) | neutralForeground2 | neutralForegroundOnBrand | neutralForeground2 |
| border | transparentStroke | none | transparentStroke |
| inner border | n/a | n/a | neutralStroke3 |