angular / angular/components

feat(table): add ability to customize the CSS class generation for columns

未关闭
#24,092 3 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
area: cdk/table feature P3
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Feature Description

Currently, if we have column say, `bankAccount`, the generated class name would be `cdk-column-bankAccount`/`mat-column-bankAccount`, but then when I use this kind of selector in my scss, I get some lint warnings, as we're supposed to use kebab-case, not camelCase... so we have to keep silencing the warnings everytime we have to do this. What we want to propose is to have an option to customize this css class generation (if possibly, globally).

### Use Case

We want to control my table styles without relying on camelCased selectors.

So, instead of this:

https://github.com/angular/components/blob/59002e1649123922df3532f4be78c485a73c5bc1/src/cdk/table/cell.ts#L144

We'd love to have an option to implement my own css class generator.

贡献指南

打开贡献指南

调研方向

首先阅读 `src/cdk/table/cell.ts` 中链接的类生成代码以及 issue 的使用场景。所请求的结果是提供一个选项(可能是全局的),用于自定义生成的列 CSS 类;issue 未指定其 API 或测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。