Question: The code below shows binding of attribute in Lightning component.

```
<div style="{!'width:' + v.padAtr + '%'}">
</div>

```

Is there any way to do the same in LWC?
In LWC, i tried the below code and then passing "width: xxx%" from js. But it didn't worked.

```
<div style={padAtr}>
    </div>

```

Answer: 
The error you're getting is from vscode's CSS validator. `style={padAtr}` works in LWC but it violates a rule in the CSS validator that vscode runs.

If you don't need/use the validator and you want to get rid of the errors, you can disable the validator entirely by going to `File > Preferences > Settings > Extensions > CSS` and unchecking the `Validate` checkbox. Otherwise you'll have to find the specific rules being violated and disable them.

As far as I can tell, you can't disable rules for a specific file or ignore a specific line, so whatever you disable will be disabled for all files.
Generally the replacement for expressions in LWC is using JS Getters.

I would try adding the following to your component and seeing if that works.

```
get styleAttr() {
    return `width: ${padAttr}%`;
}

```