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
Content below a top-app-bar needs to be top-padded to account for the height of the fixed position bar, or else it will look like this, with the content hidden behind the bar:
In standard MDC, users have direct access to classes like mdc-top-app-bar--short-fixed-adjust which specify the padding needed for a given bar configuration. MWC users do not have access to these classes, since they are in component shadow DOM.
We have a few options:
Export a CSSResult from mwc-top-app-bar.js that provides these classes (or equivalents) that users can apply to their document or shadow root and then reference in their content. Something like:
Add a <slot> to <mwc-top-app-bar> to hold user content, and the element automatically applies the right style. This seems like the more user-friendly option, but it does mean that the element becomes more of a full-layout-wrapper, which seems not ideal. Maybe worth the tradeoff, though?
The text was updated successfully, but these errors were encountered:
Content below a top-app-bar needs to be top-padded to account for the height of the fixed position bar, or else it will look like this, with the content hidden behind the bar:
In standard MDC, users have direct access to classes like
mdc-top-app-bar--short-fixed-adjust
which specify the padding needed for a given bar configuration. MWC users do not have access to these classes, since they are in component shadow DOM.We have a few options:
CSSResult
frommwc-top-app-bar.js
that provides these classes (or equivalents) that users can apply to their document or shadow root and then reference in their content. Something like:<slot>
to<mwc-top-app-bar>
to hold user content, and the element automatically applies the right style. This seems like the more user-friendly option, but it does mean that the element becomes more of a full-layout-wrapper, which seems not ideal. Maybe worth the tradeoff, though?The text was updated successfully, but these errors were encountered: