Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sites Dashboard: Remove more unnecessary DataViews style overrides #96717

Merged
merged 1 commit into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 2 additions & 96 deletions client/sites/components/sites-dataviews/dataview-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
@import "@wordpress/dataviews/build-style/style.css";

.sites-dataviews {
.dataviews-wrapper {
// Maybe move upstream to the gutenberg repository
width: 100%;
}

.dataviews-view-list {
// DataView overrides: Ideally instead of reusing the site name full field
// We should be setting a media field and a primary field.
Expand All @@ -20,113 +15,24 @@
}
}

table.dataviews-view-table thead .dataviews-view-table__row th {
border-bottom-color: var(--color-border-secondary);

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

table.dataviews-view-table .dataviews-view-table__row td {
border-bottom-color: var(--color-border-secondary);
}

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

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;
}

.dataviews-view-table-selection-checkbox {
padding-left: 12px;
&.is-selected {
.components-checkbox-control__input {
opacity: 1;
}
}
}

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

th {
border-bottom: 1px solid var(--color-neutral-5);
font-size: rem(13px);
font-weight: 400;
vertical-align: middle;
Copy link
Member Author

@okmttdhr okmttdhr Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll address this vertical-align: middle in a separate PR.

}

td {
border-bottom: 1px solid var(--color-neutral-5);
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 {
// TODO: Remove when theming APIs are implemented. pbxlJb-6A9-p2#comment-4011
li:hover {
background: var(--color-neutral-0);
}
// TODO: Remove when theming APIs are implemented. pbxlJb-6A9-p2#comment-4011
.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;
}
}

thead .dataviews-view-table__row th {
span,
button {
font-size: rem(11px);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes the use of rem for font sizes. I'm curious if the theming APIs mentioned in pbxlJb-6A9-p2#comment-4011 would address font sizing as well. IMO, it would be so great if we have it! @oandregal @ciampo

font-weight: 500;
line-height: 20px;
color: var(--color-accent-80);
text-transform: uppercase;
}

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

Expand Down
Loading