JetBrains / JetBrains/resharper-unity

[LTS 18.4] USS Bad suggestions

Open
#1,469 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Environment: **2018.4 LTS**

Valid (overwrites `padding-bottom`, `padding-top`, ...)
```css
Button {
padding-right: 1px;
padding-top: 1px;
padding-left: 1px;
padding-bottom: 1px;
}
```

Invalid (doesn't overwrite `padding-bottom`, `padding-top`, ...)
```css
Button {
padding: 1px
}
```

Obviously like in CSS you would shorthand the first block to `padding: 1px`. Sadly this does not work. Rider is still suggesting this.

This is fixed in newer versions (at least 19.3) but LTS still has a relevant user base.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the USS padding shorthand behavior in Unity 2018.4 and compare it with the fixed behavior reported in version 19.3. Trace the suggestion shown for the `padding` property and confirm that the shorthand is no longer recommended when it does not overwrite the individual padding properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.