Code Monkey home page Code Monkey logo

Comments (4)

layershifter avatar layershifter commented on May 20, 2024

TL;DR It's not a problem in Griffel.


I forked CodeSandbox and have done the same with plain CSS, https://codesandbox.io/s/brave-resonance-fcx04n?file=/src/App.js.

Chrome

image

Firefox

image


According to MDN:

For properties defined in CSS2, a length unit identifier must be provided. For length values in SVG-specific properties and their corresponding presentation attributes, the length unit identifier is optional.

https://developer.mozilla.org/en-US/docs/Web/SVG/Content_type#length

This looks like a bug in Firefox. Feel free to report it 😉

from griffel.

smhigley avatar smhigley commented on May 20, 2024

@layershifter there's also the separate issue with Firefox, but the problem with Griffel is that the r value is not compiled into CSS at all in Firefox, which makes the issue quite difficult to debug. It'd be ideal if the experience with an element using styles compiled by griffel were exactly the same as in your codesandbox.

from griffel.

layershifter avatar layershifter commented on May 20, 2024

@smhigley Griffel generates the same CSS in all browsers and tries to insert it. The problem comes from .insertRule() behavior - invalid rules (from browser's POV) are not inserted, there is nothing that we can do to solve it (using CSS extraction #53 potentially improves it as experience will be the same as with CSS).

Minimal example: https://codesandbox.io/s/kind-rosalind-teiu3m?file=/src/index.js

Chrome

image

Firefox

image

from griffel.

smhigley avatar smhigley commented on May 20, 2024

@layershifter that makes sense, thanks! Yeah, the CSS extraction would be nice, and in the meantime logging the output to the console works ¯_(ツ)_/¯

from griffel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.