Control CSS API: Determine what is allowed and forbidden
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 39
- Forks
- 14
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 13
Description
🧹 Tech Debt
Forbidden APIs
A PR thread highlighted that the way we do the hover highlight (on text/number fields) is broken if you set horizontal padding on the component.
We need to:
- Determine which components have styling that breaks when modified, i.e. padding.
- For those cases, determine how to sufficiently protect users from unknowingly applying padding that breaks the styling, i.e. mark the styling as
!important.
Allowed APIs
A PR thread highlighted that the when you target font styling to our controls they are frequently overridden and it was changed to allow font properties to be set.
We need to:
- Determine which style properties want to allow configuring from their default, i.e. we provide a default font but allow it to be overridden.
- We need to determine how that API should behave, i.e. controls have a label, does setting the font on the nimble-text-field impact the font of the input and the label? Maybe we need to instead encourage styling the label part
nimble-text-field::part(label)to configure the label and the font should only apply to the text field. - For the cases we want to support, we need to make sure that those properties propagate correctly, ie styling the sub-component as
inherit
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked PR discussion threads and auditing the controls' CSS APIs for padding-sensitive hover styling and font propagation. Done means the affected components and properties are identified, forbidden styling is protected, and supported font behavior—including label or part scope and inheritance—is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- design, frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100