NativeScript / NativeScript/NativeScript
TabView styling and css inheritance
還沒有人認領這個 Issue。
- 主要語言
- TypeScript
- 星號
- 25.7k
- 分支
- 1.7k
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 35
描述
Problem: There are no separate elements for the tab content and the tab strip item. The TabViewItem element wraps both. This breaks css inheritance - the css is applied to both content and tab strip, but you can't override the css separately.
There are also some discrepancies between properties and between platforms:
font-sizeandtext-transformhave native implementations on TabViewItem,colordoesn't. There is howevertab-text-colorwhich applies color to all tab strip items.text-transformis for some reason not an inherited propertyfont-sizeis hard coded for iOS TabViewItems to 10.
Proposed solution:
As a rule I think inherited css properties shouldn't have implementations on elements that are not separately represented in the mark up.
- Make
text-transforminherited as per CSS spec. - Remove
font-sizeandtext-transformfrom TabViewItem. - Introduce new properties in their place on both TabView and TabViewItem
tab-text-font-sizeandtab-text-transform. - Optionally introduce more font properties, e.g.
tab-text-font,tab-text-font-style,tab-text-font-family.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先定位 TabView 和 TabViewItem 的實作及其平台特定的樣式程式碼。比較 iOS 和 Android 上目前的繼承機制與原生屬性行為,然後檢查現有的 tab-text-color 是如何公開的。完成的標準是:繼承的 text-transform 按照 CSS 的規定運作,獨立的分頁文字屬性涵蓋所提議的字型大小和轉換行為,並且平台差異得到解決。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- css, typescript
- 領域
- frontend, mobile-dev
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100