divriots / code.to.design

The only API for HTML to Figma
1 stars 0 forks source link

Bug with :before :after elements #1

Closed adamgiebl closed 11 months ago

adamgiebl commented 12 months ago

Describe the bug image

To Reproduce

<button>
  Hold that
</button>
button {
  width: 165px;
  height: 62px;
  cursor: pointer;
  color: #fff;
  font-size: 17px;
  border-radius: 1rem;
  border: none;
  position: relative;
  background: #100720;
  transition: 0.1s;
}

button::after {
  content: '';
  width: 100%;
  height: 100%;
  background-image: radial-gradient( circle farthest-corner at 10% 20%,  rgba(255,94,247,1) 17.8%, rgba(2,245,255,1) 100.2% );
  filter: blur(15px);
  z-index: -1;
  position: absolute;
  left: 0;
  top: 0;
}

button:active {
  transform: scale(0.9) rotate(3deg);
  background: radial-gradient( circle farthest-corner at 10% 20%,  rgba(255,94,247,1) 17.8%, rgba(2,245,255,1) 100.2% );
  transition: 0.5s;
}
muryoh commented 11 months ago

Hi @adamgiebl, thx for letting us know! Pushed a fix internally that has to be reviewed :rocket: