react-component / react-component/select

样式能否不污染全局

Open
#776 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

* {box-sizing: border-box;}

这选择器影响范围太大,容易对页面其他组件进行污染,应收到select-prefix内部

https://github.com/react-component/select/blob/de5d98d463019f5c00b22e05de925078a54eb946/assets/index.less#L3

Contributor guide

No contributing guide indexed for this repository

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

Open assets/index.less at line 3 and inspect how the universal box-sizing selector is applied. Scope the selector within the component's select-prefix so it no longer affects unrelated page components, then verify that the Select styles still work without global pollution.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.