Issue with Firefox: Calc function in CSS3 not functioning as expected

When using the calc() function to set scale values in my less class as a function, I encountered an issue where it works on Chrome but not Firefox. Below is the code snippet for my class:

.zoom(@value) {
    transform: scaleX(@value);
    -moz-transform: scaleX(@value);
    -ms-transform: scaleX(@value);
    -webkit-transform: scaleX(@value);
    transform-origin: 0;
    .blocFreq {
        &:before {
            -webkit-transform: scaleX(calc(1/@value)) !important;
            -moz-transform: scaleX(-moz-calc(1/@value)) !important;
            -ms-transform: scaleX(calc(1/@value)) !important;
            transform: scaleX(calc(1/@value)) !important;
        }
    }
    span.frequence {
        -webkit-transform: scaleX(calc(1/@value))rotate(-44deg) !important;
        -moz-transform: scaleX(-moz-calc(1/@value))rotate(-44deg) !important;
        -ms-transform: scaleX(calc(1/@value))rotate(-44deg) !important;
        transform: scaleX(calc(1/@value))rotate(-44deg) !important; 
    }
    .text,
    .text-service,
    .popover {
        -webkit-transform: scaleX(calc(1/@value)) !important;
        -moz-transform: scaleX(calc(1/@value)) !important;
        -o-transform: scaleX(calc(1/@value)) !important;
        -ms-transform: scaleX(calc(1/@value)) !important;
        transform: scaleX(calc(1/@value)) !important;
    }
}

Answer №1

Consider eliminating the calc function and instead utilize (1/@value). This adjustment should resolve the issue you are experiencing.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Aligning elements vertically in HTML is not functioning as expected

Trying to align cell values vertically in the middle of a table using CSS has been a challenge. I've tried various vertical-align options, but nothing seems to work. Here's the CSS code I'm currently using: div.cell { ...

Steps for positioning the scroll-thumb in the middle of the scrollbar

Currently, I am working on a react application and facing an issue while trying to display images with custom zoom-in/zoom-out functionality. Due to the need to add markers to each image that require precise positioning, using a pre-existing library for zo ...

Tips for styling inside containers with margins between elements without affecting their position on the page

I have three items enclosed in a container with a background color and padding applied. However, when I try to add margin between them, the elements shift to the next row. .div-category{ background-color: #2274A5; padding-left: 50px; padding-right: ...

Problem with off-screen canvas performance in Firefox

Currently, I am facing an issue that I suspect is due to a mistake on my end, but I can't seem to pinpoint it. (This issue arises in Firefox 8) Here's what I'm doing - I have a large sprite file, from which I extract a single tile and place ...

When hovering over the label area, the entire rectangle will be highlighted

Could someone please assist with highlighting the entire row of the parent for the drop down feature? In the given scenario, level1 and level23 should be highlighted like the child items are. The goal is to highlight the entire row with the entire width. ...

Modify the font style of the jQuery autocomplete box to customize the text appearance

Hello, I'm a beginner with jquery and currently experimenting with the autocomplete feature. I managed to change the font of the dropdown list successfully but struggling to do the same for the input field itself. Does anyone know how to achieve this ...

Is there a way to incorporate text at the end of a row in HTML?

I have a photo and some text on my website. The photo is displayed on the left side, while the text appears nicely on the right side. Now, I am looking to include an additional block of text below the existing text. How can I accomplish this? What steps ...

Creating an Eye-catching Presentation: Tips for Adding Text to Your CSS3 Slideshow

I am currently in the process of creating a CSS3 slideshow with text for each image. I found inspiration from this example: . However, I made some modifications to make it responsive. Here is the HTML code I have used: <div id="slideshow"> < ...

Transforming a dropdown menu to inline using CSS

Here is the current situation at the top, and below is what I'm aiming to achieve I am trying to customize the language switcher on this WordPress-based website. My goal is to have both flags displayed next to each other in a single line without requ ...

Adjusting the position of a background image with Bootstrap

problem I am struggling with the layout of this design. My goal is to center an image of an app within these boxes, ensuring that it overlaps both the top and bottom of the background for sections containing text. I have experimented with various techniqu ...

What is the best way to achieve this Bootstrap design without copying the content?

Trying to achieve a specific Bootstrap layout without repeating content is my current challenge. Essentially, I aim to divide some content into 2 columns at the sm/md breakpoints and then switch to 3 columns for the lg breakpoint. The layout for sm/md bre ...

My draggable item seems stuck in place. Any ideas on how to get it moving again?

I have been trying to implement some code I found on this link. Despite adding all the necessary file links, the code is not functioning as expected. It should be able to move within the bounds of a container, but it's not working properly. var max ...

- bullet point: tabulated

I need to create an unordered list with URLs included and indented, while keeping all lines justified to the left. * line one text text ted more text text text * line two text ted more text text text * line three text ted more text text text ...

What is the best way to switch a single class using jQuery without impacting other elements with the same class

I'm in the process of implementing a commenting system similar to Reddit on my website. Each comment is equipped with a small button in the top right corner that allows users to collapse the comment. To achieve the collapsing effect, I am utilizing j ...

Adjust the border color of the <input> element when it is clicked on

I'm currently working on a login screen for my next.js application and I've encountered an issue where the border color changes to a mixture of white and blue when I select an input field. https://i.stack.imgur.com/R2yKa.png I attempted to reso ...

When I set the margin to 0 for both the div and body elements, the divs still have margins

Attempting to place a canvas inside a div named touch-container, with 3 additional divs on top and sizing them using javascript. The issue arises as each of the 3 divs appear to have a margin that fills up the remaining space in the container, despite spe ...

Having trouble with 'nam run' command after updating webpack.mix.ks file

Currently, I am in the process of working on a Laravel project and attempting to integrate some less stylesheets. However, when I make changes to the webpack.min.js file like this: let mix = require('laravel-mix'); /* |----------------------- ...

Is there a way to prevent navbar links from wrapping when closed with CSS?

Upon closing my side navbar, I encountered an issue where the links warp to the size of the navbar. I am seeking a solution to keep the links (highlighted in pink in the image below) the same size without warping. Is there a CSS technique to achieve this? ...

What is the process for linking my CSS file in Yii2 framework?

Currently, I am in the process of linking my CSS file to my project. To achieve this, here is what I have done: Within the /web/css/ directory, I created a file named my-custom.css. Following that, in the /views/my_folder/_form.php file, I inserted the fo ...

What could be causing my button to pass the event to its parent element?

I've implemented a clever trick within a div, where I have included my own custom "data" indicating what action to take when the user clicks on it. My JavaScript code snippet is as follows (with some code omitted for clarity): $('[data-hqf-swit ...