Skip to content

Commit

Permalink
Use CSS naming schema for selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jan 9, 2024
1 parent 60a214b commit 537e399
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/dataviews/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
li {
margin: 0;

.dataviews-list-view__item-wrapper {
.dataviews-view-list__item-wrapper {
position: relative;
padding-right: $grid-unit-30;
border-radius: $grid-unit-05;
Expand All @@ -247,19 +247,19 @@
&:not(.is-selected):hover {
color: var(--wp-admin-theme-color);

.dataviews-list-view__fields {
.dataviews-view-list__fields {
color: var(--wp-admin-theme-color);
}
}
}

li.is-selected,
li.is-selected:focus-within {
.dataviews-list-view__item-wrapper {
.dataviews-view-list__item-wrapper {
background-color: var(--wp-admin-theme-color);
color: $white;

.dataviews-list-view__fields,
.dataviews-view-list__fields,
.components-button {
color: $white;
}
Expand Down Expand Up @@ -334,15 +334,15 @@
}
}

.dataviews-list-view__details-button {
.dataviews-view-list__details-button {
align-self: center;
opacity: 0;
}

li.is-selected,
li:hover,
li:focus-within {
.dataviews-list-view__details-button {
.dataviews-view-list__details-button {
opacity: 1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/dataviews/src/view-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function ViewList( {
'is-selected': selection.includes( item.id ),
} ) }
>
<HStack className="dataviews-list-view__item-wrapper">
<HStack className="dataviews-view-list__item-wrapper">
<div
role="button"
tabIndex={ 0 }
Expand Down

0 comments on commit 537e399

Please sign in to comment.