ni / ni/nimble

Control CSS API: Determine what is allowed and forbidden

Open
#598 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

tech debt
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:

  1. Determine which components have styling that breaks when modified, i.e. padding.
  2. 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:

  1. Determine which style properties want to allow configuring from their default, i.e. we provide a default font but allow it to be overridden.
  2. 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.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.