We need to theme our generated views outpage i.e page or block . So that we can customize the layour as per our requirements . Follow below tutorials for drupal 8 views themeing .
- Create a views and add required fields set Format: Unformatted list Under Format Settings uncheck 'Add views row classes'
- copy view name machine name ,found on view edit screen url. From below ex view machine name is 'latest_products' https://localhost/drupal_8.2.2/admin/structure/views/view/latest_products
- Now create a twig template file of below name inside your current theme folder views-view-fields--latest_products.html.twig Note : double dash (- -) after views-view-fields
- Open this file inside your editor and put your markup then print required fields as shown below
- Note: All available fields machine name can found under Content type manage fields page. In my drupal, i found from this below page https://localhost/drupal_8.2.2/admin/structure/types/manage/products/fields
- Put required css inside your theme css file . In my case i have default bartik theme enabled, So i put below css in core/themes/bartik/css/layout.css
- Now save your view , clear cache then access view page , ex below url https://localhost/drupal_8.2.2/latest-products You should see your new custom formatted layout . In this way we can theme any view whether it is block or page .


