fleet/frontend/components/TableContainer/_styles.scss
Jacob Shandling 48156009fa
Frontend – clean up breakpoints (#12711)
## Improve breakpoint variables to be useful "sm", "md", etc. instead of
the pixel widths they are set to

Also made sure all media queries are using these variables instead of
hard-coded values.

See @lukeheath's previous to-do in `frontend > styles > var >
breakpoints.scss`

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2023-07-12 15:45:49 -07:00

183 lines
3.4 KiB
SCSS

.table-container {
// TODO: Fix hacky solution to clientside search being 0 no longer accessing rows.length
.client-result-count-0 {
display: none;
}
&__header {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
padding-bottom: $pad-medium;
&.stack-table-controls {
flex-direction: column-reverse;
align-items: start;
@media (min-width: $break-xs) {
flex-direction: row;
align-items: end;
justify-content: space-between;
}
@media (min-width: $break-md) {
align-items: center;
}
}
}
&__header-left {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
&.stack-table-controls {
flex-direction: column-reverse;
align-items: start;
@media (min-width: $break-md) {
flex-direction: row;
justify-content: space-between;
align-items: center;
}
}
}
&__results-count {
display: flex;
align-items: baseline;
font-size: $x-small;
font-weight: $bold;
color: $core-fleet-black;
margin: 0;
:first-child {
margin-right: $pad-small;
}
.count-error {
color: $ui-error;
}
.count-loading {
color: $ui-fleet-black-50;
}
&.stack-table-controls {
padding-top: $pad-large;
@media (min-width: $break-md) {
padding-top: 0;
}
}
}
&__edit-columns-button:hover {
cursor: pointer;
text-decoration: underline;
color: $core-vibrant-blue-over;
}
&__search-input {
position: relative;
color: $core-fleet-blue;
width: 100%;
margin-left: $pad-small;
.search-field__input-wrapper {
width: 250px;
margin-bottom: 0;
@media (min-width: $break-xs) {
width: 300px;
}
@media (min-width: $break-md) {
width: 344px;
}
}
&.stack-table-controls {
padding-bottom: $pad-large;
margin-left: 0;
@media (min-width: $break-xs) {
margin-left: $pad-medium;
padding-bottom: 0;
}
}
&::before {
display: inline-block;
position: absolute;
padding: 5px 0 0 0; // centers spin
content: url(../assets/images/icon-search-fleet-black-16x16@2x.png);
transform: scale(0.5);
height: 20px;
top: 3px;
left: 8px;
}
.input-field {
padding-left: 42px;
width: 100%;
}
.fleeticon {
position: absolute;
top: 10px;
left: 12px;
font-size: $medium;
color: $core-fleet-black;
}
}
.table-container__search-input.wide-search {
margin-left: 0;
.search-field__input-wrapper {
width: 100%;
margin-bottom: 0;
padding-bottom: $pad-medium;
}
}
#search-tooltip {
width: 190px;
text-align: center;
}
&__empty-page {
display: flex;
flex-direction: column;
align-items: center;
}
&__previous {
width: 350px;
.pagination__pager-wrap {
justify-content: left;
button:last-child {
display: none;
}
}
}
.fleet-checkbox__tick {
top: 1px;
}
// Truncates clickable button cells (not compatible with buttons with icons)
tbody {
.children-wrapper {
overflow: hidden;
white-space: nowrap;
display: block;
text-overflow: ellipsis;
}
.icon {
vertical-align: sub;
}
}
}