File size: 3,117 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@import '@wordpress/base-styles/breakpoints';
@import '@wordpress/base-styles/mixins';
@import '@wordpress/dataviews/build-style/style.css';

.dataviews-wrapper {
	// Maybe move upstream to the gutenberg repository
	width: 100%;
	padding-block-end: 40px;

	@include break-mobile {
		padding-block-end: 0;
	}

	tr.dataviews-view-table__row {
		background: var( --studio-white );

		.components-checkbox-control__input {
			opacity: 0;
		}
		.components-checkbox-control__input:checked,
		.components-checkbox-control__input:indeterminate {
			opacity: 1;
		}

		&:hover {
			.site-set-favorite__favorite-icon,
			.components-checkbox-control__input {
				opacity: 1;
			}
		}

		th {
			font-size: rem( 13px );
			font-weight: 400;
			vertical-align: middle;
		}

		td {
			vertical-align: middle;

			&:has( .sites-dataviews__site ) {
				width: 20%;
			}
		}

		.dataviews-view-table__cell-content-wrapper {
			font-size: rem( 13px );
		}

		.dataviews-view-table__checkbox-column,
		.components-checkbox-control__input {
			label.components-checkbox-control__label {
				display: none;
			}
			&[type='checkbox'] {
				border-color: var( --color-neutral-5 );
			}
		}

		.site-sort__clickable {
			cursor: pointer;
		}
	}

	ul.dataviews-view-list {
		li:hover {
			background: var( --color-neutral-0 );
		}
		.is-selected {
			background-color: var( --color-neutral-0 );
		}

		// Needs to be moved upstream to the gutenberg repository.
		.dataviews-view-list__item {
			box-sizing: border-box;
		}
	}

	.components-search-control input[type='search'].components-search-control__input {
		background: var( --studio-white );
		border: 1px solid var( --color-neutral-5 );
	}

	thead .dataviews-view-table__row th {
		span.dataviews-view-table-header,
		button {
			font-size: rem( 11px );
			font-weight: 500;
			line-height: 20px;
			text-transform: uppercase;
		}

		.dataviews-view-table-header-button {
			color: inherit;
		}
	}

	.sites-dataviews__actions {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: end;
		flex-wrap: nowrap;

		@media ( min-width: 1080px ) {
			.site-actions__actions-large-screen {
				float: none;
				margin-inline-end: 20px;
			}
		}

		> *:not( :last-child ) {
			margin-inline-end: 10px;
		}

		.components-dropdown-menu__toggle,
		.site-preview__open {
			.gridicon {
				width: 18px;
				height: 18px;
			}
		}

		&.sites-dataviews__actions-error {
			svg {
				color: var( --color-accent-5 );
			}
		}
	}

	// Color overrides for focus states of Action button
	.components-button:focus:not( :disabled ) {
		--wp-components-color-accent: var( --color-primary-light );
	}
}

// TODO: remove when this is implemented upstream.
//
// https://github.com/WordPress/gutenberg/pull/65086
.is-section-a8c-for-agencies-referrals .dataviews-view-table tr,
.is-section-a8c-for-agencies-sites .dataviews-view-table tr {
	th:last-child,
	td:last-child {
		width: 20px;
		white-space: nowrap;
		position: sticky;
		right: 0;
		z-index: 1;
		background: linear-gradient( 90deg, rgba( 255, 255, 255, 0 ) 0, rgb( 255, 255, 255 ) 25% );
		padding-left: 48px;
	}
}