How to add padding to rows in the Lightning data table in LWC?
 I have created a data table using HTML and JavaScript. But I cannot apply padding on the rows vertically. Is there any way I can do that?Â
HTML code:Â
   Â                resize-column-disabled show-row-number-column="false"Â
                class="slds-table slds-table_bordered slds-table_striped">
   Â
JavaScript Code:Â
import { LightningElement, track } from 'lwc';
import searchAccounts from '@salesforce/apex/AccountController.searchAccount';
const columnList = [
    {label: 'Id', fieldName: 'Id'},
    {label: 'Name', fieldName: 'Name', type: 'text'},
    {label: 'Website', fieldName: 'Website'},
    {label: 'Industry', fieldName: 'Industry'}
];
export default class datatableDemo extends LightningElement {
    @track accountList;
    @track columnList = columnList;
    @track noRecordsFound = true;
    connectedCallback() { Â
            searchAccounts()Â
            .then(result => {
                this.accountList = result;
                this.noRecordsFound = false;
            })
            .catch(error => {
                this.accountList = undefined;
                this.noRecordsFound = true;
            })
       Â
    }
}
You can use a property called cellAttributes to add a class name within a cell. If you add an SLDS padding class or define a class inside the LWC css file, the lightning data table will rewrite it. So, you can define the CSS as a static source by following some simple steps:
Create a CSS file which is a static source, by defining the CSS query.
Use load style for loading the static source.
Add the properties required for columns.
You can use the SLDS data table if you want to add padding to every row, and if you want to add padding to rows, consider using