Giter VIP home page Giter VIP logo

Comments (5)

robinweser avatar robinweser commented on June 19, 2024

Did you configure fela-plugin-responsive-value correctly?

Here's an example of how it works: https://codesandbox.io/s/dawn-fire-462sj7?file=/src/index.js

from fela.

rvanheesostk avatar rvanheesostk commented on June 19, 2024

Very confident closure! 😄

Yeah, it works for all other responsive values, apart from the transform.

from fela.

rvanheesostk avatar rvanheesostk commented on June 19, 2024

It looks like it might be an issue within react-fela, using the css method. There are some rules that don't work, some that do. I'm unsure what the relation is between the ones that are broken. text-transform also doesn't work, while fontSize does work.

Any chance this can be reopened? Because it's definitely not resolved.

This is (part of) my React component:

<Flex
  sx={{
    left: '50%',
    position: 'absolute',
    zIndex: 11,
    border: '1px solid #DADCDF',
    width: 'auto',
    height: 'auto',
    borderRadius: ['3px', , '5px'],
    bottom: ['50%', , '0px'],
    transform: ['translate(-50%, 50%)', , 'translateX(-50%)'],
  }}
/>

And this (part of) the Flex component used above. <Flex> can be seen as a wrapper for fela.

const HTMLElement: string = asProp as keyof JSX.IntrinsicElements;
const { css } = useFela();

return (
  <HTMLElement
    value={value}
    {...(autoComplete && { autoComplete: autoComplete })}
    {...props}
    className={`${css(sx as any)} ${className}`}
    ref={ref}
  >
    {children}
  </HTMLElement>
);

The borderRadius and bottom rules are properly transpiled. The transform one is not.

from fela.

robinweser avatar robinweser commented on June 19, 2024

What's your Fela configuration in this case? I'm sure it's a configuration issue, because the plugin doesn't care which property you use; either it works or not.

That said, I can reopen of course.

from fela.

rvanheesostk avatar rvanheesostk commented on June 19, 2024

I have created a workaround for this issue. Thanks anyways!

from fela.

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.