Strike and replace
Strike and replace: a CSS button. Copy the rules, or the prompt that rebuilds it.
CSS
.btn-119 {
font: 600 15px/1 system-ui,sans-serif;
color: #fff;
background: #16a34a;
border: 0;
border-radius: 8px;
padding: 13px 22px;
cursor: pointer;
display: inline-flex;
gap: 8px;
align-items: center;
transition: background .2s
}
.btn-119 s {
color: #bbf7d0;
text-decoration: none;
position: relative
}
.btn-119 s::after {
content: "";
position: absolute;
left: 0;
right: 100%;
top: 50%;
height: 2px;
background: #fff;
transition: right .3s
}
.btn-119 b {
max-width: 0;
overflow: hidden;
opacity: 0;
transition: max-width .3s,opacity .3s;
font-weight: 800
}
.btn-119:hover s::after {
right: 0
}
.btn-119:hover b {
max-width: 60px;
opacity: 1
}
.btn-119:hover {
background: #15803d
}
.btn-119:focus-visible {
outline: 2px solid #16a34a;
outline-offset: 3px
}
.btn-119:active {
background: #166534
}
HTML
<button class="btn-119"><s>$29</s><b>$19</b>Upgrade</button>Prompt
A green #16a34a button, 8px radius, white 15px semibold text, 13px by 22px padding, showing "$29 Upgrade" with the price in pale green #bbf7d0. On hover a white 2px line strikes through the old price from left to right (300ms) and a bold "$19" expands into view beside it; background #15803d. Active #166534. Focus 2px green outline offset 3px.