github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/styles/components/recommendation-card.scss (about) 1 .recommendation-card { 2 display: grid; 3 grid-template-columns: [overview] 55% [active-task] 45%; 4 grid-template-rows: [top] auto [headings] auto [diffs] auto [narrative] auto [main] auto [actions]; 5 6 border: 1px solid $ui-gray-200; 7 margin-bottom: 1.5em; 8 9 .overview { 10 grid-column: overview; 11 border-right: 1px solid $ui-gray-200; 12 } 13 14 .active-task { 15 grid-column: active-task; 16 } 17 18 .active-task-group { 19 // Allow the active task section to be in a grouped test selector container 20 display: contents; 21 } 22 23 .top { 24 grid-row: top; 25 26 &.active-task { 27 display: flex; 28 justify-content: flex-end; 29 30 .accordion-toggle { 31 margin-left: 1em; 32 } 33 } 34 } 35 36 header { 37 grid-row: headings; 38 } 39 40 .diffs { 41 grid-row: diffs; 42 } 43 44 .main { 45 grid-row: main; 46 47 &.overview { 48 display: flex; 49 flex-direction: column; 50 justify-content: center; 51 } 52 53 &.active-task { 54 > li:first-child { 55 margin-bottom: 2em; 56 } 57 } 58 } 59 60 .actions { 61 grid-row: actions; 62 63 .button { 64 margin-bottom: 2em; 65 margin-right: 0.5em; 66 } 67 } 68 69 h3 { 70 font-size: $size-4; 71 font-weight: $weight-semibold; 72 73 .group { 74 color: $cool-gray-500; 75 font-weight: $weight-normal; 76 77 &:before { 78 content: '/'; 79 padding: 0 0.25em 0 0.1em; 80 } 81 } 82 } 83 84 .namespace { 85 color: $cool-gray-500; 86 87 .namespace-label { 88 font-weight: $weight-semibold; 89 } 90 } 91 92 .increase { 93 color: $red-500; 94 } 95 96 .decrease { 97 color: $teal-500; 98 } 99 100 .inner-container { 101 padding: 1em 2em; 102 103 &.task-toggles { 104 padding-right: 0; 105 } 106 } 107 108 .diffs-table { 109 th, 110 td { 111 padding-right: 0.5em; 112 } 113 114 td.diff { 115 color: $cool-gray-500; 116 } 117 } 118 119 .active-task th.diff { 120 display: none; 121 } 122 123 .copy-button { 124 display: flex; 125 flex-direction: row-reverse; 126 127 .button { 128 display: flex; 129 flex-direction: row-reverse; 130 color: $ui-gray-400; 131 132 .icon { 133 margin-left: 0.75em; 134 } 135 } 136 } 137 138 .task-toggles { 139 table { 140 width: calc(100% + 1px); // To remove a mysterious 1px gap between this and the pane border 141 } 142 143 th { 144 vertical-align: bottom; 145 font-size: $size-7; 146 147 &.toggle-cell .toggle { 148 display: flex; 149 flex-direction: column-reverse; 150 align-items: center; 151 padding-bottom: 2px; 152 153 .label-wrapper { 154 margin-bottom: 6px; 155 } 156 } 157 } 158 159 .toggle-all { 160 text-align: right; 161 } 162 163 tr { 164 border-bottom: 1px solid $ui-gray-200; 165 } 166 167 tbody tr:not(.active):hover { 168 background: $ui-gray-100; 169 cursor: pointer; 170 } 171 172 tr.active { 173 color: $blue; 174 font-weight: bold; 175 176 // When there’s only one task, it doesn’t need highlighting 177 &:first-child:last-child { 178 color: inherit; 179 font-weight: inherit; 180 } 181 182 td:last-child { 183 position: relative; 184 } 185 186 svg { 187 position: absolute; 188 top: -1px; 189 left: calc(100% - 1px); // To balance out the table width calc above 190 191 .border-cover { 192 fill: white; 193 width: 2px; 194 } 195 196 .triangle { 197 fill: transparent; 198 stroke: $ui-gray-200; 199 } 200 } 201 } 202 203 th, 204 td { 205 padding: 0.75em 0; 206 207 &:first-child { 208 padding-left: 5px; 209 } 210 211 &:last-child { 212 padding-right: 2em; 213 } 214 } 215 216 .task-cell { 217 width: 100%; 218 } 219 220 .toggle-cell { 221 text-align: center; 222 padding: 0.75em; 223 } 224 } 225 }