123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762 |
- /* stylelint-disable selector-max-combinators */
- // General listings, like for pages, images or snippets
- ul.listing {
- @include unlist();
- }
- .listing {
- margin-bottom: 2em;
- color: theme('colors.text-context');
- font-size: 0.95em;
- ul {
- list-style-type: none;
- margin: 0;
- padding-inline-start: 0;
- }
- > li {
- padding: 1em 0;
- border-bottom: 1px dashed theme('colors.border-field-default');
- }
- h3 {
- margin: 0;
- font-size: 1em;
- }
- td,
- th {
- text-align: start;
- padding: calc(1em * var(--w-density-factor)) 0.3em;
- @include media-breakpoint-up(sm) {
- padding: calc(1em * var(--w-density-factor)) 1em;
- }
- &.no-padding {
- padding: 0;
- }
- }
- &.small td,
- th {
- padding: 0.6em 0.3em;
- @include media-breakpoint-up(sm) {
- padding: 0.6em 1em;
- }
- }
- td {
- vertical-align: middle;
- overflow-wrap: anywhere;
- }
- td.title {
- line-height: 2em;
- }
- thead {
- font-size: 1.1em;
- color: theme('colors.text-context');
- border-bottom: 1px solid theme('colors.border-furniture');
- th {
- font-size: 0.9em;
- font-weight: normal;
- white-space: nowrap;
- }
- th.title {
- white-space: normal;
- }
- th.children {
- border: 0;
- }
- th a.label:not(.teal) {
- text-decoration: none;
- color: inherit;
- position: relative;
- &.icon:after {
- inset-inline-end: 0;
- }
- }
- }
- &:has(
- td:first-child input[type='checkbox']:only-child,
- th:first-child input[type='checkbox']:only-child
- ) {
- td:first-child,
- th:first-child {
- // Bulk actions, use smaller width (48px) for smaller screens
- // (no need to match where the breadcrumbs are)
- width: theme('spacing.10');
- text-align: center;
- // stylelint-disable-next-line selector-max-specificity
- input[type='checkbox'] {
- margin-inline-end: 0;
- }
- }
- }
- &.full-width {
- margin-bottom: -3em; // this negates the padding added to the bottom of .content
- }
- .table-headers {
- border-bottom: 1px solid theme('colors.border-furniture');
- }
- tbody {
- border-bottom: 1px dashed theme('colors.border-field-default');
- tr {
- border-top: 1px dashed theme('colors.border-furniture');
- &:first-child {
- border-top: 1px dashed theme('colors.border-furniture');
- }
- }
- tr.selected {
- background-color: theme('colors.text-highlight');
- }
- }
- &.full-width tbody {
- border: 0;
- }
- &.chooser {
- tbody .parent-page {
- font-size: 1.15em;
- background-color: theme('colors.border-furniture');
- }
- tbody .parent-page .title {
- a {
- display: inline-block;
- }
- .w-status--label {
- border: 1px solid;
- }
- }
- tbody .title a {
- @include transition(none);
- display: block;
- }
- tbody tr:hover {
- background-color: theme('colors.surface-button-hover');
- color: theme('colors.text-button');
- .title a,
- .title a:hover,
- .title label {
- color: theme('colors.text-button');
- }
- .parent a {
- color: theme('colors.text-button');
- }
- .w-status {
- border-color: theme('colors.text-button');
- }
- }
- tbody tr.disabled td {
- opacity: 0.25;
- }
- tbody tr.disabled td.children {
- opacity: 1;
- }
- tbody tr.disabled:hover {
- background-color: inherit;
- color: inherit;
- .title {
- cursor: not-allowed;
- }
- .w-status {
- border-color: inherit;
- }
- }
- }
- &.small tbody tr {
- font-size: 1em;
- }
- &.full-width .divider td {
- padding-inline-start: 20px;
- }
- // specific columns
- .bulk {
- padding-inline-end: 0;
- label {
- font-size: 1em;
- display: block;
- width: 100%;
- position: relative;
- }
- label span {
- @apply w-sr-only;
- }
- input {
- margin-top: 3px;
- }
- }
- .title {
- word-break: break-word;
- .title-wrapper,
- h2 {
- @apply w-label-1;
- display: inline;
- margin: 0;
- vertical-align: middle;
- a {
- color: inherit;
- text-decoration: none;
- // stylelint-disable max-nesting-depth
- &:hover {
- color: theme('colors.text-link-default');
- }
- }
- }
- .icon-folder {
- margin: 3px 0.3em 0 0;
- vertical-align: top;
- }
- }
- .actions {
- float: inline-end;
- font-size: 0.8rem;
- margin: 0;
- a {
- text-decoration: none;
- }
- > li {
- float: inline-start;
- padding: 0 0.5em 0 0;
- vertical-align: middle;
- }
- }
- .moderate-actions form {
- float: inline-start;
- margin: 0 1em 1em 0;
- }
- .children,
- .no-children {
- padding: 0;
- vertical-align: middle;
- a {
- display: block;
- padding: 0;
- }
- }
- .children a {
- color: theme('colors.text-button-outline-default');
- display: block;
- text-align: center;
- .icon {
- width: 3rem;
- height: 3rem;
- }
- }
- .no-children a {
- color: theme('colors.text-button-outline-default');
- display: block;
- text-align: center;
- line-height: 3rem;
- .icon {
- width: 1.5rem;
- height: 1.5rem;
- }
- &:hover,
- &:focus {
- color: theme('colors.text-button-outline-hover');
- }
- &:focus {
- opacity: 1; //opacity is already changed on hover on the parent tr
- }
- }
- &.small .children a .icon {
- width: 30px;
- height: 30px;
- }
- th.ord {
- text-align: center;
- .icon {
- width: 1rem;
- height: 1rem;
- vertical-align: middle;
- margin-inline-end: 2px;
- }
- &--active a,
- a:hover {
- color: theme('colors.text-button-outline-hover');
- }
- }
- .w-orderable__item--active {
- border: 1px dashed theme('colors.border-field-default');
- border-width: 1px 0;
- td {
- display: none;
- }
- .ord,
- .title {
- display: table-cell;
- }
- }
- .w-orderable__item__handle {
- cursor: move;
- }
- table .no-results-message {
- padding-inline-start: 20px;
- }
- .w-status {
- margin: 0;
- margin-inline: 0;
- }
- &.images img {
- @include transition(border-color 0.2s ease);
- border: 3px solid theme('colors.surface-page');
- }
- &--dashboard {
- margin-bottom: 0;
- tbody {
- border-bottom: 0;
- }
- td:first-child {
- padding-inline-start: theme('spacing.6');
- }
- td:last-child {
- padding-inline-end: theme('spacing.6');
- }
- .title a {
- font-weight: theme('fontWeight.medium');
- }
- .w-status--label {
- float: inline-end;
- font-size: inherit;
- }
- .indicator .icon {
- padding: 0;
- }
- .privacy-indicator {
- margin-inline-end: theme('spacing.2');
- // Adjust icon size to closely match the appearance of the adjacent 'locked' icon
- .icon-no-view {
- width: 1.1em;
- height: 1.1em;
- }
- }
- .tasks {
- text-wrap: nowrap;
- }
- .actions li {
- float: inline-end;
- }
- @include media-breakpoint-down(md) {
- display: grid;
- tr {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: theme('spacing.2');
- padding: theme('spacing.5');
- }
- td,
- td:first-child,
- td:last-child {
- padding: 0;
- }
- .title {
- width: 100%;
- }
- .actions-container {
- margin-inline-start: auto;
- }
- }
- }
- }
- .image-choice {
- // Force the link to be displayed as a block, so its focus outline has the right shape.
- display: block;
- color: inherit;
- overflow-wrap: break-word;
- word-wrap: break-word;
- }
- // stylelint-disable-next-line no-duplicate-selectors
- ul.listing {
- border-top: 1px dashed theme('colors.border-field-default');
- margin-bottom: 2em;
- }
- table.listing {
- width: 100%;
- }
- // Use consistent spacing to the left and right of the header.
- .page-explorer .w-slim-header {
- @include media-breakpoint-up(md) {
- padding-inline-end: theme('spacing.6');
- }
- }
- .page-explorer .listing {
- position: relative;
- .table-headers,
- thead tr {
- height: 35px;
- }
- }
- .pagination {
- text-align: center;
- p {
- margin: 0;
- }
- ul {
- @include unlist();
- margin-top: -1.7em;
- }
- li {
- line-height: 1em;
- }
- .prev {
- float: inline-start;
- }
- .next {
- float: inline-end;
- }
- }
- .listing.full-width + .pagination {
- margin-top: 3em;
- border-top: 1px dashed theme('colors.border-furniture');
- padding: 2em 50px 0;
- }
- // listing filters
- .listing-filter {
- @include clearfix();
- background-color: theme('colors.surface-header');
- border-width: 1px 0;
- margin: 3em 0;
- }
- .filter-title {
- float: inline-start;
- font-size: 0.95em;
- padding: 1em;
- margin: 0 1em 0 0;
- background-color: theme('colors.border-furniture');
- }
- .filter-options {
- @include unlist();
- @include clearfix();
- overflow: hidden;
- li {
- padding: 0.8em;
- float: inline-start;
- }
- &__icon {
- width: 1em;
- height: 1em;
- margin-inline-end: 0.2em;
- vertical-align: middle;
- position: relative;
- top: -1px;
- }
- }
- @include media-breakpoint-up(sm) {
- .listing {
- &.horiz {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
- align-items: flex-end;
- justify-items: initial;
- }
- &.images {
- border: 0;
- > li {
- padding: 1.5em;
- width: auto;
- height: auto;
- text-align: center;
- margin-top: -1px;
- border: 0;
- .bulk-action-checkbox {
- float: inline-start;
- margin: -0.5em 0.5em 0.5em -0.75em;
- }
- .bulk-action-checkbox + .image-choice {
- clear: both;
- margin-top: 1em;
- }
- .image {
- text-align: center;
- height: 180px;
- // Vertically center the image.
- &:before {
- content: '';
- display: inline-block;
- height: 100%;
- vertical-align: middle;
- margin-inline-end: -0.25em;
- }
- img {
- display: inline-block;
- vertical-align: middle;
- }
- }
- &:hover {
- img {
- border-color: theme('colors.border-button-outline-default');
- }
- }
- }
- }
- .bulk-action-checkbox {
- opacity: 0;
- &.show,
- &:checked {
- opacity: 1;
- }
- }
- .no-children {
- border-color: transparent;
- a {
- opacity: 0;
- }
- }
- tr:hover,
- tr:focus-within {
- .no-children a,
- .bulk-action-checkbox {
- opacity: 1;
- }
- }
- // used on the image listing
- li:hover,
- li:focus-within {
- .bulk-action-checkbox {
- opacity: 1;
- }
- }
- tr:hover .children {
- background-color: theme('colors.text-button-outline-default');
- .icon {
- color: theme('colors.surface-page');
- }
- }
- td.children:hover {
- background-color: theme('colors.text-button-outline-default');
- }
- table .no-results-message {
- padding-inline-start: 50px;
- }
- &:has(
- td:first-child input[type='checkbox']:only-child,
- th:first-child input[type='checkbox']:only-child
- ) {
- // Bulk actions, match the width of the header spacing up until
- // the page title (final breadcrumb item):
- // Breadcrumbs left padding: 20px
- // Breadcrumbs toggle: 50px
- // Breadcrumbs toggle margin right: 10px
- // Total: 80px
- th:first-child,
- td:first-child {
- width: theme('spacing.20');
- // Follow the left padding for the breadcrumbs (20px)
- // so the checkbox align with the breadcrumbs toggle.
- padding-inline-start: theme('spacing.5');
- }
- }
- // Remove left padding from the second column if either bulk action or
- // custom ordering is active, as the padding to match the breadcrumbs is
- // already handled by the first column.
- &:has(
- td:first-child input[type='checkbox']:only-child,
- th:first-child input[type='checkbox']:only-child,
- .ord
- ) {
- th:nth-child(2),
- td:nth-child(2) {
- padding-inline-start: 0;
- }
- }
- // If either:
- // - no nice padding is applied,
- // - we're not in a report listing,
- // - we're not in the editor view,
- // - we're not in the dashboard view,
- // and:
- // - no bulk actions are present,
- // - we're not in the "custom ordering" mode,
- // then apply the same 80px padding via the first column's left padding.
- &:not(.nice-padding &, .report &, .editor-view &, .w-dashboard &):not(
- :has(
- td:first-child input[type='checkbox']:only-child,
- th:first-child input[type='checkbox']:only-child,
- .ord
- )
- ) {
- // stylelint-disable-next-line selector-max-specificity
- th:first-child,
- td:first-child {
- padding-inline-start: theme('spacing.20');
- }
- }
- &.full-width .divider td {
- padding-inline-start: 50px;
- }
- }
- }
- // State
- .listing__item--active {
- > .actions {
- visibility: visible;
- }
- }
- // stylelint-disable no-duplicate-selectors
- // Transitions
- .listing {
- .children,
- .no-children {
- @include transition(background-color 0.2s ease);
- }
- .children a,
- .no-children a {
- @include transition(all 0.2s ease);
- }
- }
- // Ordering
- td.ord {
- // Align with the row's title text, and the column's label.
- vertical-align: top;
- }
- table.listing {
- th.ordered {
- color: theme('colors.text-link-default');
- }
- }
- .w-title-ellipsis {
- display: inline-block;
- vertical-align: bottom;
- max-width: 20ch;
- overflow-x: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- @include media-breakpoint-up(sm) {
- max-width: 30ch;
- }
- @include media-breakpoint-up(md) {
- max-width: none;
- }
- }
|