第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

減少 Angular Material 標簽標簽寬度的正確方法?

減少 Angular Material 標簽標簽寬度的正確方法?

BIG陽 2023-02-24 15:28:09
問題由于/deep/、>>>和已被棄用,在桌面上減少最小寬度為160px::ng-deep的寬度的正確方法是什么?mat-tab-label沒有在主要覆蓋它styles.css我仍然希望將 Material Tabs 的這種自定義樣式限定在父組件范圍內(nèi)。材料規(guī)格聲明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我的父組件設(shè)置為320px,這大致允許每個106pxmat-tab-label。編輯 1由于關(guān)注點分離, 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.正是我想要避免的
查看完整描述

1 回答

?
交互式愛情

TA貢獻1712條經(jīng)驗 獲得超3個贊

我最終MatTab在全局中定義了一個自定義樣式styles.css:


your-component-selector {

  .mat-tab-label {

    min-width: 25px !important; // In addition to mat-strech-tabs allowing tabs to fill remaining space in parent container

    padding: 5px;

  }

}

your-component-selector將進行范圍界定,自定義樣式不會在其他組件MatTab實例中流血。

不要忘記使用mat-stretch-tabson<mat-tab-group>來拉伸 Angular Material 選項卡以適應(yīng)父寬度。


查看完整回答
反對 回復 2023-02-24
  • 1 回答
  • 0 關(guān)注
  • 171 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號