Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
simplify buttons
  • Loading branch information
scruffian committed Feb 6, 2026
commit 117a51611d75d4928a99aac8c644e55c20f2bfc5
5 changes: 2 additions & 3 deletions packages/block-library/src/playlist-track/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,8 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
</InspectorControls>
<li { ...blockProps }>
{ !! temporaryURL && <Spinner /> }
<Button
<button
className="wp-block-playlist-track__button"
__next40pxDefaultSize
data-wp-context={ JSON.stringify( { uniqueId } ) }
aria-current={
currentTrack === uniqueId ? 'true' : 'false'
Expand Down Expand Up @@ -278,7 +277,7 @@ const PlaylistTrackEdit = ( { attributes, setAttributes, context } ) => {
<span className="screen-reader-text">
{ __( 'Select to play this track' ) }
</span>
</Button>
</button>
</li>
</>
);
Expand Down
19 changes: 4 additions & 15 deletions packages/block-library/src/playlist-track/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@use "@wordpress/base-styles/variables" as *;

.wp-block-playlist-track {
&:hover {
background-color: color-mix(in srgb, currentColor 10%, transparent);
Expand All @@ -13,29 +11,20 @@
display: flex;
align-items: center;
width: 100%;
padding: $grid-unit-10;
padding: var(--wp--preset--spacing--20, 0.5em);
font-size: inherit;
font-family: inherit;
text-align: left;
background-color: transparent;
color: inherit;
border: 0;
outline-offset: 2px;

// Override WordPress Button component in editor.
&.components-button {
height: auto;
min-height: auto;

&:hover {
color: inherit;
}
}
cursor: pointer;

.wp-block-playlist__tracklist-show-numbers &::before {
content: counter(playlist-track);
width: 2ch;
margin-right: $grid-unit-10;
margin-right: var(--wp--preset--spacing--20, 0.5em);
font-size: 0.85em;
opacity: 0.7;
}
Expand All @@ -53,7 +42,7 @@
display: block;
font-size: 0.85em;
opacity: 0.7;
margin-top: 2px;
margin-top: 0.125em;
}

.wp-block-playlist-track__length {
Expand Down