In mendix Atlas UI it is not possible to hide the datagrid on no list found through CSS.
you can use the datagrid extension widget for achieving this in that one tab will be there as empty table in that tab you can configure in such a way that you show a message or you can leave it as empty or anything.
Hope that widget meets your requirements.
I don’t know whether data-grid visibility can be achieved through scss or not . But Pls check below steps to achieve this in other way.
Create a non persistable entity with boolean attribute.
Inside the dataview , add your datagrid with conditional visibility. If boolean is true then only your datagrid will be visible.
I would suggest upgrading to data grid 2 , this functionality come by default .
If a list is empty, it always shows the text 'No items found'. If you want to remove it; add a custom class to your styling with this styling. Add the class to the specific listview and the text will be removed.