Guest User

Airtable Whitespace Hack CSS for Stylus

a guest
May 23rd, 2019
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 4.27 KB | None | 0 0
  1. @-moz-document domain("airtable.com") {
  2. /*****
  3. * AirTable UI Formatting
  4. * 2019-01-25 - Further reduced left-hand spacing, fixed current day highlighting in calendar view
  5. * 2018-05-10 - Removed Greasemonkey colour code [Partially native in Airtable]
  6. *   - Additional whitespace tweaks added
  7. * 2017-08-27 - Removed code for toggling sidebar/weekends [Native in Airtable]
  8. *
  9. *****/
  10.  
  11. /*****
  12. * Space Hacks
  13. *  The below code reduces the amount of whitespace around the table view
  14. *****/
  15.  
  16. /*****
  17. * Ugly Top Bar Collapsing
  18. *  This pushes the actual title of the base partially off the top of the window, but we dont' switch bases too often, so ¯\_(ツ)_/¯
  19. *****/
  20. #topbar,
  21. #appTopbar > div {
  22.     height: 2px !important;
  23. }
  24. div.flex.absolute.left-0.right-0.baymax {
  25.     top: 2px !important;
  26. }
  27. #table {
  28.     top: 30px !important;
  29. }
  30.  
  31. /*****
  32. * Row Header Cleanup
  33. *  Removes the row number, expand record button, and associated whitespace
  34. *****/
  35. .dataRow .rowNumber {
  36.     display: none !important;
  37. }
  38. .dataRow .expandButtonLeft {
  39.     display: none !important;
  40. }
  41. .dataRow .staticCellContainer {
  42.     width: 0px !important;
  43. }
  44. .dataRow .cell.primary {
  45.     margin-left: 0px !important;
  46.     width: calc(100%) !important;
  47. }
  48.  
  49. /* The below code fixes the column width in groups*/
  50.  
  51. div.dataRow.leftPane, div.gridViewGroup.leftPane{
  52.     left: 16px !important;
  53.     width: calc(100% - 16px) !important;
  54. }
  55. .groupHeaderCell.groupHeaderLabelCell{
  56.     width: 100% !important;
  57. }
  58.  
  59. /* Special fix for "ghost" row */
  60. div#dataLeftPane div.dataRow.leftPane.ghost{
  61.     width: calc(100% - 16px) !important;
  62. }
  63.  
  64. /*****
  65. * Column Label Icon Removal
  66. *  Removes the label icon and resizes the label to take up the full space
  67. *****/
  68. .nameAndDescription svg {
  69.     display: none !important;
  70. }
  71. .nameAndDescription .name {
  72.     left: 8px !important;
  73.     width: calc(100% - 19px) !important;
  74. }
  75. }
  76.  
  77. @-moz-document domain("airtable.com") {
  78. /*****
  79. * Expanded Records – Whitespace
  80. *  Removes field label icons, darkens the label text, and removes much of the whitespace
  81. *****/
  82. .labelCellPair svg.displayTypeIcon {
  83.     display: none !important;
  84. }
  85. .labelCellPair .fieldLabel {
  86.     color: rgb(3, 3, 3) !important;
  87. }
  88. .labelCellPair {
  89.     margin-bottom: 1em !important;
  90. }
  91.  
  92. /*****
  93. * Expanded Records – Expand, Multi-Column
  94. *  On wider windows (above 1410px), sets the expanded record view to use 80% of the screen for multiple columns
  95. *****/
  96. @media(min-width:1410px) {
  97.     .detailViewWithActivityFeedBase .dialog {
  98.         width: 80% !important;
  99.     }
  100.     .detailViewWithActivityFeedBaseLeft {
  101.         width: calc(100% - 308px) !important;
  102.     }
  103.     .detailViewWithActivityFeedBaseLeft .body {
  104.         columns: 10 calc(450px + 26px);
  105.         padding: 0px!important;
  106.         column-gap: 12px !important;
  107.         column-rule: 1px dotted #ddd;
  108.     }
  109.     .detailViewWithActivityFeedBaseLeft .hiddenColumnsHeader {
  110.         margin-top: 1em;
  111.         margin-bottom: 1em;
  112.         column-span: all !important;
  113.     }
  114.     .labelCellPair {
  115.         width: calc(100%) !important;
  116.         margin: 0px !important;
  117.         padding: .5em 1em 1em 1em !important;
  118.         -webkit-column-break-inside: avoid !important;
  119.         page-break-inside: avoid !important;
  120.         break-inside: avoid !important;
  121.     }
  122. }
  123. }
  124.  
  125. @-moz-document domain("airtable.com") {
  126. /*****
  127. * Table Formatting
  128. *****/
  129.  
  130. /* Colour calculated cells */
  131.  
  132. div.cell[data-columntype ~="lookup"],
  133. div.cell[data-columntype ~="count"],
  134. div.cell[data-columntype ~="rollup"] {
  135.     background-color: aliceblue;
  136. }
  137. div.cell[data-columntype ~="formula"] {
  138.     background-color: ivory;
  139. }
  140. }
  141.  
  142. @-moz-document domain("airtable.com") {
  143. /*****
  144. * Calendar Formatting
  145. *****/
  146.  
  147. /* Resize calendar entries to fit article titles on hover */
  148. .calendarRecord:hover {
  149.     height: auto;
  150.     margin-bottom: 1px;
  151. }
  152. .calendarRecord:hover .recordHoverTarget {
  153.     height: 100%;
  154.     min-height: 25px;
  155.     opacity: 1;
  156.     z-index: 100;
  157. }
  158. .calendarRecord:hover .recordHoverTarget > .flex {
  159.     height: auto!important;
  160.     min-height: 24px;
  161. }
  162. .calendarRecord:hover .recordHoverTarget .truncate {
  163.     white-space: normal;
  164.     margin-bottom: 2px;
  165. }
  166.  
  167. /* Highlight current day*/
  168. #calendarView div.rounded.blue.text-white {
  169.     width: calc(100% - 12px);
  170. }
  171. }
Add Comment
Please, Sign In to add comment