You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
In some cases, the floating label needs to immediately know its width. This creates problems if the floating label is instantiated inside a display: none; parent element, like a hidden dialog. To resolve that, we provide a helper method that estimates the width of an element if hidden. If visible, it computes the true width.
Copy file name to clipboardexpand all lines: packages/mdc-dom/README.md
+1
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ Function Signature | Description
34
34
--- | ---
35
35
`closest(element: Element, selector: string) => ?Element` | Returns the ancestor of the given element matching the given selector (which may be the element itself if it matches), or `null` if no matching ancestor is found.
36
36
`matches(element: Element, selector: string) => boolean` | Returns true if the given element matches the given CSS selector.
37
+
`estimateScrollWidth(element: Element) => number` | Returns the true optical width of the element if visible or an estimation if hidden by a parent element with `display: none;`.
0 commit comments