# Adapt CSS code for perspective components

**URL:** <https://forum.inductiveautomation.com/t/adapt-css-code-for-perspective-components/85918>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 19, 2024, 9:17am UTC](https://forum.inductiveautomation.com/t/adapt-css-code-for-perspective-components/85918 "2024-02-19T09:17:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MILLOGO\_Arthur](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@MILLOGO\_Arthur](https://forum.inductiveautomation.com/u/MILLOGO_Arthur)\
**Post date:** [February 19, 2024, 9:17am UTC](https://forum.inductiveautomation.com/t/adapt-css-code-for-perspective-components/85918/1 "2024-02-19T09:17:56Z")

</div>

Hello, do you know how I can modify my css code so that it works on my component ?  
I replace "button" by my class name " Heavybtn". But for the span "transition", "gradient", I don't know how to proceed.

HTML:

```auto
<button>
  <span class="transition"></span>
  <span class="gradient"></span>
  <span class="label">Button</span>
</button>

```

CSS:

```auto
.psc-Heavybtn{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 17px;
  padding: 1em 2.7em;
  font-weight: 500;
  background: #1f2937;
  color: white;
  border: none;
  position: relative;
  overflow: hidden;
  border-radius: 0.6em;
  cursor: pointer;
}

.gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 0.6em;
  margin-top: -0.25em;
  background-image: linear-gradient(
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0.3)
  );
}

.label {
  position: relative;
  top: -1px;
}

.transition {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-duration: 500ms;
  background-color: rgba(16, 185, 129, 0.6);
  border-radius: 9999px;
  width: 0;
  height: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.psc-Heavybtn:hover .transition {
  width: 14em;
  height: 14em;
}

.psc-Heavybtn:active {
  transform: scale(0.97);
}

```
