1

I have an issue with Firefox rendering element to which is applied box shadow and rotation. Is there any fix for this? I tried to apply rotateZ() backface visibility, no results.

.button{
    backface-visibility: hidden;
    padding-left: 1em;
    padding-right: 1em;
    line-height: 2.5em;
    color: #FFF;
    cursor: pointer;
    min-width: 200px;
    text-align: center;
    text-decoration: none;
    transition: all 100ms ease-in-out 0s;
    background: #FFB600;
    display: inline-block;
    font-family: sans-serif;
    font-size: 1.2em;
    outline: 1px solid transparent;
    box-shadow: 0.1em 0.1em 0px #DC6900, 0.2em 0.2em 1px #A32020;
    transform:rotate(3deg);
    padding-left: 1.5em;
    padding-right: 1.5em;
    background-color: #DC6900;
}
<a class="button">I am fancy button</a>

Firefox rendering 1

Jan
  • 689
  • 1
  • 6
  • 22

1 Answers1

0

Just can add a border:

border: 1px solid #DC6900;

https://stackoverflow.com/a/9333891/1064270

.button{
    backface-visibility: hidden;
    padding-left: 1em;
    padding-right: 1em;
    line-height: 5.5em;
    color: #FFF;
    cursor: pointer;
    min-width: 400px;
    text-align: center;
    text-decoration: none;
    transition: all 100ms ease-in-out 0s;
    background: #FFB600;
    display: inline-block;
    font-family: sans-serif;
    font-size: 1.2em;
    outline: 1px solid transparent;
    box-shadow: 0.1em 0.1em 0px #DC6900, 0.2em 0.2em 1px #A32020;
    padding-left: 1.5em;
    transform:rotate(3deg);
    padding-right: 1.5em;
    background-color: #DC6900;
}

.with-border{border: 1px solid #DC6900;}
<a class="button">I am fancy button</a> 
<br/>
<br/>
<a class="button with-border">I have a border</a>
Community
  • 1
  • 1
Gaël Barbin
  • 3,769
  • 3
  • 25
  • 52