Firefox CSS Issue

See image 1 and 2. the button doesn't disappear after the card is flipped. HTML
<div class="front">
<button id="front-button">Hover Me!</button>
</div>
<div class="front">
<button id="front-button">Hover Me!</button>
</div>
JS
const isMobile = window.innerWidth < 768;

const buttonText = isMobile ? 'Tap Me!' : 'Hover Me!';
document.getElementById('front-button').textContent = buttonText;
const isMobile = window.innerWidth < 768;

const buttonText = isMobile ? 'Tap Me!' : 'Hover Me!';
document.getElementById('front-button').textContent = buttonText;
CSS
.front button {
width: 120px;
border: 1px solid black;
background: black;
border-radius: 50px;
margin-left: auto;
margin-right: auto;
padding: 5px 20px;
color: rgb(255, 255, 255);
text-align: center;
}
.front button {
width: 120px;
border: 1px solid black;
background: black;
border-radius: 50px;
margin-left: auto;
margin-right: auto;
padding: 5px 20px;
color: rgb(255, 255, 255);
text-align: center;
}
These are the code for the button
No description
No description
10 Replies
riddle
riddle5mo ago
GitHub
GitHub - r-ddle/r-ddle.netlify.app: A simple website made by a newb...
A simple website made by a newbie web dev. Contribute to r-ddle/r-ddle.netlify.app development by creating an account on GitHub.
clevermissfox
clevermissfox5mo ago
backface-visibility: hidden
riddle
riddle5mo ago
I am supposed to add this to the button right?
riddle
riddle5mo ago
if yes then this is what happens
No description
riddle
riddle5mo ago
I'm stil confused tho. Opera GX, Edge, Chrome and Brave all of those browsers don't have an issue except for firefox are we supposed to write css differently for firefox?
clevermissfox
clevermissfox5mo ago
Try adding prefixes, yeah Firefox and safari have some properties that aren’t supported. For example, if I use a background-image: linear-gradient(to right in oklch, oklch(39%, 0.3, 360), oklch(44%, 0.28, 360)) it doesn’t work in Firefox ! No gradient, no background at all because I hadn’t added a fall back. However, taking off the “in oklch” allows it to work🤷🏻‍♀️ I’m not sure about backface-visibility but it seems like it should be supported. Try prefixing it also backface-visibility: hidden; -moz-backface-visibility:hidden; -webkit-backface-visibility: hidden;
riddle
riddle5mo ago
It really didn't do anything, I checked browser stats and firefox is not that popular not feeling like learning firefox rules just to fix a card 🥹 well thanks anyways
clevermissfox
clevermissfox5mo ago
Firefox is one of the three major browsers, if you don’t want to learn how to work with it , you could try running your style sheet through a prefixer to get all the prefixes you need
vince
vince5mo ago
Are you learning web dev to find a job? Writing compatible code is a must
Jochem
Jochem5mo ago
it's also not that much of a hassle
Want results from more Discord servers?
Add your server
More Posts
Give me feedback and suggestionsI made a design about login component thru figma. I just want some feedback of which i will need to Figma and translating designsHey quick question, I've just recently started learning Figma coming from a fullstack background. DoIf the grid-items had different heights and gap had to be between them is of 20px.In the below codepen, the gap shows too much between, how to make sure that row gap and column gap iShould I use margin-block or traditional margin properties?Recently learned about the margin-block property in CSS, which sets margins based on the writing dirHello, I found this semi-solution to animating <details> and was wondering of the drawbacksI found this blog https://dev.to/neophen/css-only-accordion-with-animations-2d8n, and modified the tMaximize image size, minimize column widthhttps://codesandbox.io/p/sandbox/columns-rsfszr?file=%2Fsrc%2FApp.tsx%3A17%2C50 I am trying to lay [update] done inverted corner not able to achieve animation?i tried to mimic the tutorial "Create a clean, modern navigation with HTML & CSS" without the chromeHow can I make this get smaller as the screen changes sizes?So I created a container with a nice styling I wanted to ask is it possible for the container to decHow to convert Buff to File Without locally saving itHow do you convert buff to a file? I have an endpoint that modifies images uploaded, and that endpoihalf a starnewbie here: was trying to color my star icon (in this case, 20% of it as red color solid, rest will