discourse/app/assets/stylesheets/common/base/groups.scss

237 lines
4.5 KiB
SCSS

.groups-header {
margin-bottom: 30px;
}
.groups-header-filters {
display: flex;
.groups-header-filters-name,
.groups-header-filters-type {
margin-right: 5px;
margin-bottom: 0;
}
&:last-child {
margin-right: 0;
}
}
.groups-table {
width: 100%;
th {
border-bottom: 1px solid $primary-low;
padding: 0.5em;
text-align: left;
}
.sortable {
&:hover {
background-color: $primary-low;
cursor: pointer;
}
}
tr {
td {
padding: 0.8em;
color: $primary-medium;
}
td.groups-info {
width: 50%;
}
td.group-user-status {
.d-icon {
color: $primary;
}
}
td.groups-user-count {
width: 17%;
font-size: $font-up-2;
.d-icon {
display: none;
}
}
td.groups-table-type {
width: 17%;
font-size: $font-up-1;
}
td.groups-table-membership {
font-size: $font-up-1;
.group-membership-button {
font-size: $font-down-1;
display: inline-block;
margin-left: 5px;
&:empty {
display: none;
}
}
}
@include breakpoint(mobile) {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
padding: 10px 0;
td.groups-info,
td.groups-user-count,
td.groups-table-type,
td.groups-table-membership {
width: 100%;
padding: 0;
text-align: right;
font-size: $font-0;
}
td.groups-info {
grid-column-start: 1;
grid-column-end: 4;
grid-row-start: 1;
grid-row-end: 3;
text-align: left;
line-height: $line-height-medium;
margin-bottom: 0.5em;
a {
display: flex;
}
.group-avatar-flair {
margin-right: 0.5em;
}
.groups-info-name {
word-break: break-all;
max-width: 45vw;
}
.groups-info-full-name {
font-size: $font-down-1;
}
}
td.groups-user-count {
display: flex;
align-items: center;
grid-column-start: 4;
grid-row-start: 1;
.d-icon {
display: inline-block;
margin-right: 0.25em;
color: $primary-low-mid;
}
}
td.groups-table-type {
grid-row-start: 3;
grid-column-start: 1;
grid-column-end: 3;
text-align: left;
align-self: center;
.d-icon {
margin-right: 0.25em;
}
}
td.groups-table-membership {
grid-row-start: 3;
grid-column-start: 3;
grid-column-end: 5;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
button {
margin-left: 5px;
display: flex;
}
&:empty {
display: none;
}
}
// IE11 grid support
display: -ms-grid;
-ms-grid-columns: 1fr 1fr;
-ms-grid-rows: 1fr 1fr;
td.groups-info {
display: -ms-grid;
-ms-grid-row: 1;
-ms-grid-column: 1;
}
td.groups-user-count {
justify-content: flex-end;
-ms-grid-row: 1;
-ms-grid-column: 2;
}
td.groups-table-type {
display: flex;
align-items: center;
-ms-grid-row: 2;
-ms-grid-column: 1;
}
td.groups-table-membership {
display: flex;
-ms-grid-row: 2;
-ms-grid-column: 2;
}
}
}
@include breakpoint(mobile) {
thead {
display: none;
}
}
.groups-info {
.group-info-details {
vertical-align: middle;
}
.groups-info-name {
font-weight: bold;
color: $primary;
color: dark-light-choose($primary-high, $secondary-low);
}
.groups-info-full-name {
color: dark-light-choose($primary-high, $secondary-low);
}
.groups-info-title {
font-size: $font-down-1;
color: dark-light-choose($primary-medium, $secondary-medium);
}
.group-avatar-flair {
vertical-align: middle;
color: $primary;
}
span {
display: inline-block;
}
$size: 40px;
$icon-size: $size / 1.8;
.avatar-flair {
background-size: $size;
height: $size;
width: $size;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
background-repeat: no-repeat;
.d-icon {
height: $icon-size;
width: $icon-size;
}
}
.avatar-flair-image {
width: $size;
}
}
}