Custom CSS button in Streamlit

Hello, I am currently trying to make a custom CSS button import into my local Streamlit host, but the button is not showing up. The button is going to be a signup button. Any help would be appreciated, thank you.

This is my css file with my button cosmetics:

.custom-button {
  .button {
      position: relative;
      transition: all 0.3s ease-in-out;
      box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
      padding-block: 0.5rem;
      padding-inline: 1.25rem;
      background-color: rgb(0 107 179);
      border-radius: 9999px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffff;
      gap: 10px;
      font-weight: bold;
      border: 3px solid #ffffff4d;
      outline: none;
      overflow: hidden;
      font-size: 15px;
    }

    .icon {
      width: 24px;
      height: 24px;
      transition: all 0.3s ease-in-out;
    }

    .button:hover {
      transform: scale(1.05);
      border-color: #fff9;
    }

    .button:hover .icon {
      transform: translate(4px);
    }

    .button:hover::before {
      animation: shine 1.5s ease-out infinite;
    }

    .button::before {
      content: "";
      position: absolute;
      width: 100px;
      height: 100%;
      background-image: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0) 70%
      );
      top: 0;
      left: -100px;
      opacity: 0.6;
    }

    @keyframes shine {
      0% {
        left: -100px;
      }
    
      60% {
        left: 100%;
      }
    
      to {
        left: 100%;
      }
    }
}

And here is what I have done in my python file:

with open('signup_button.css') as f:
        st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.