rusackas commented on a change in pull request #15853:
URL: https://github.com/apache/superset/pull/15853#discussion_r678677739



##########
File path: superset-frontend/src/views/CRUD/utils.tsx
##########
@@ -274,29 +272,39 @@ export function shortenSQL(sql: string, maxLines: number) 
{
 const breakpoints = [576, 768, 992, 1200];
 export const mq = breakpoints.map(bp => `@media (max-width: ${bp}px)`);
 
-export const CardContainer = styled.div`
-  display: grid;
-  grid-template-columns: repeat(auto-fit, minmax(31%, 31%));
-  ${mq[3]} {
-    grid-template-columns: repeat(auto-fit, minmax(31%, 31%));
-  }
-  ${mq[2]} {
-    grid-template-columns: repeat(auto-fit, minmax(48%, 48%));
-  }
-  ${mq[1]} {
-    grid-template-columns: repeat(auto-fit, minmax(50%, 80%));
+export const CardStylesOverrides = styled.div`
+  .ant-card-cover > div {
+    height: 264px;
   }
-  grid-gap: ${({ theme }) => theme.gridUnit * 8}px;
-  justify-content: left;
-  padding: ${({ theme }) => theme.gridUnit * 6}px;
-  padding-top: ${({ theme }) => theme.gridUnit * 2}px;
+`;
+
+export const CardContainer = styled.div<{
+  showThumbnails?: boolean | undefined;
+}>`
+  ${({ showThumbnails, theme }) => `
+    overflow: hidden;
+    display: grid;
+    grid-gap: ${theme.gridUnit * 12}px ${theme.gridUnit * 4}px;
+    grid-template-columns: repeat(auto-fit, 300px);
+    max-height: ${showThumbnails ? '314' : '140'}px;
+    margin-top: ${theme.gridUnit * -6.25}px;
+    padding: ${
+      showThumbnails
+        ? `${theme.gridUnit * 8.75}px ${theme.gridUnit * 9}px`
+        : `${theme.gridUnit * 8.25}px ${theme.gridUnit * 9}px`

Review comment:
       More fractional gridUnits... if/when these are needed, it might be nice 
to add a comment as to why, or do something like `${theme.gridUnit * 8) + 1}px` 
to be explicit if it really is to add a single pixel (e.g. accounting for a 1px 
border or something)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to