linkedin / linkedin/css-blocks
Resolve transitive inheritance conflicts
- Dominant language
- TypeScript
- Stars
- 6.3k
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
### Input
```css
/* base.block.css */
:scope { width: 100%; color: red; }
```
```css
/* sub.block.css */
@block-reference base from "./base.block.css";
:scope {
extends: base;
width: 80%;
}
```
```css
/* subsub.block.css */
@block-reference sub from "./sub.block.css";
:scope {
extends: sub;
width: 60%;
color: blue
}
```
### Output
```css
/* base.css */
.base { width: 100%; color: red; }
```
```css
/* sub.css */
.sub { width: 80%; }
.base.sub { width: 80%; }
```
```css
/* subsub.css */
.sub { width: 60%; }
.base.subsub { width: 60%; } /* expected, but not generated */
.base.subsub { color: blue; } /* expected, but not generated */
.sub.subsub { width: 60%; }
```
Contributor guide
Research direction
Reproduce the case using base.block.css, sub.block.css, and subsub.block.css, then trace how transitive inheritance is resolved into base.css, sub.css, and subsub.css. Done means subsub.css includes the expected .base.subsub width and color rules while retaining the shown direct and .sub.subsub output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100