由于/deep/
、>>>
和已被弃用,在桌面上减少最小宽度为160px::ng-deep
的宽度的正确方法是什么?mat-tab-label
没有在主要覆盖它styles.css
我仍然希望将 Material Tabs 的这种自定义样式限定在父组件范围内。
Fixed tabs display all tabs on one screen, with each tab at a fixed width. The width of each tab is determined by dividing the number of tabs by the screen width. They don’t scroll to reveal more tabs; the visible tab set represents the only tabs available.
然而,这并不完全正确,在我的例子中,max-width
我的父组件设置为320px,这大致允许每个106pxmat-tab-label
。
由于关注点分离, Angular Material 文档提倡的Add the overriding style to your global stylesheet. Scope the selectors so that it only affects the specific elements you need it to.
正是我想要避免的
交互式爱情
相关分类