File tree Expand file tree Collapse file tree
components/UI/Button/FileUploadButton Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,8 +147,8 @@ function FileUploadButton({
147147 { disabled && disabledTooltip ? (
148148 < Tooltip
149149 label = { disabledTooltip }
150- position = "top "
151- className = "tooltip-centered"
150+ position = "right "
151+ className = "tooltip-centered tooltip-right-wide "
152152 >
153153 < div
154154 tabIndex = { 0 }
Original file line number Diff line number Diff line change @@ -36,3 +36,24 @@ body {
3636 max-width : 300px ;
3737 white-space : normal;
3838}
39+
40+ /* ---------- Right-positioned tooltips need more width ---------- */
41+ /* Higher specificity selector to override USWDS default without !important */
42+ span .tooltip-right-wide .usa-tooltip__body .is-set ,
43+ span .tooltip-right-wide .usa-tooltip__body .is-visible {
44+ max-width : 450px ;
45+ min-width : 250px ;
46+ }
47+
48+ /* ---------- Adjust vertical alignment for right-positioned tooltips ---------- */
49+ /* CSS variable for easy adjustment if needed */
50+ span .tooltip-right-wide {
51+ --tooltip-vertical-offset : -20px ;
52+ }
53+
54+ /* USWDS applies inline styles dynamically (element.style.top), which have higher
55+ specificity than any CSS selector. !important is the only way to override them.
56+ The -20px offset centers the tooltip vertically with the FileUploadButton card. */
57+ span .tooltip-right-wide .usa-tooltip__body--right .is-visible {
58+ transform : translateY (var (--tooltip-vertical-offset )) !important ;
59+ }
You can’t perform that action at this time.
0 commit comments