I am attempting to create a universal CSS modification for a webpage element that resembles:
<button data-action="link" class="cardImageContainer coveredImage cardContent itemAction lazy lazy-image-fadein-fast" data-blurhash="long string that I am unsure if it is identifying or not" aria-label="sample_video" style="background-image: url("http://localhost:8096/Items/7215c9b47ed950ddeb42219e4b4091a1/Images/Primary?);"></button>
The program allows for CSS customization, and the following code works as long as I manually input that long string (dataset:id) in the URL section.
.card:hover .cardImageContainer,
.card.show-animation:focus .cardImageContainer {
background-image: url("/Items/ that long id /Images/Logo?") !important;
The long ID can be found in the inspect element under dataset: DOMStringMap id. Is there a way to automatically incorporate this into the hover background image URL?
.card:hover .cardImageContainer,
.card.show-animation:focus .cardImageContainer {
background-image: url("/Items/dataset:id/Images/Logo?") !important;