Search code examples
javascripthtmlcsssweetalert

SweetAlert Icon overflow-y


I have an issue modifying my website. When I call Swal.fire(...), something like this happens: Not properly rendered icon

Icon on the picture overflows and not renders properly(seems like scrollbar affects on icon render). How can I fix this? Thanks Here is my custom css code:

* {
    margin: 0px;
    padding: 0px;
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
    color: white;
    user-select: none;
    font-size: 20px;
}
h1 {
    font-size: 60px;
}

body {
    z-index: -2;
    background-color: black;
}

#canvas1 {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    z-index:-1;
    background: black;
}

.header {
    text-align: center;
    height: 100vh;
}

.header-title {
    font-size: 70px;
    font-weight: bold;
    margin-top: 40vh;
}

section {
    padding: 20vh;
}

.section-title {
    font-size: 60px;
}
.section-text {
    font-size: 25px;
}

footer {
    height: 30vh;
    background-color: rgb(24, 24, 24);
}

.navbar {
    font-size: 40px;
    position: fixed;
    list-style-type: none;
    overflow: hidden;
}

.navbar > li {
    float: left;
}

.navbar > li a {
    transition: .3s;
    display: block;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

.navbar > li a:hover {
    background-color: rgba(255, 255, 255, 0.671);
}

input {
    background-color: black;
    margin: 20px;
}

.account-creator {
    margin: auto;
  width: 50%;
  border: 3px solid white;
  padding: 10px;
  border-radius: 10px;
  margin-top: 30vh;
  padding: 10vh;
  
}

.account-creator {
    margin-bottom: 100px;
}

.small-title {
    font-size: 40px;
}

button {
    background-color: black;
}

/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 35px;
overflow-y: hidden;
}

/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}

/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
}

.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
top: 4px;
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}

input:checked + .slider {
background-color: #f3214f;
}

input:focus + .slider {
box-shadow: 0 0 1px #f3214f;
}

input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
border-radius: 34px;
}

.slider.round:before {
border-radius: 50%;
}

.input_description{
    font-size: 30px;
    
}

.simple-button {
    background-color: #f3214f;
    padding: 10px;
    border-radius: 5px;
    border: none;
    transition: .4s;
    margin: 30px;
}

.simple-button:hover {
    transform: scale(1.2);
    box-shadow: 0px 0px 10px #f3214faf;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background-image: linear-gradient(45deg, rgb(255, 115, 0) 0%, rgb(255, 0, 0) 100%);
    border-radius: 20px;    
}

::-webkit-scrollbar-thumb:hover {
    background-color: white;
    background-image: none;
    border-radius: 20px;    
}

.clauses-field{
    border: 3px solid white;
    border-radius: 10px;
    max-height: 300px;
    position: absolute;
    overflow-y: scroll;
    margin-left: 40vw;
    padding: 30px;
}


 

Idk maybe this code ruins everything, but it will be good if I don't need to change anything in here cause my website could just crash


Solution

  • For some resone you icon is overflowing so that orange line is scrollbar

    add .sa-icon.sa-success { overflow:hidden } this code in your css . if this dosent work , just inspect success icon and copy its class and add overflow:hidden to that. if you still cant do it just copy popup code and add to your question , i will give you working code.