https://linen.dev logo
Join Discord
Powered by
# react
  • a

    ambitious-knife-25690

    07/10/2020, 1:42 PM
    Updated the PR
  • a

    ambitious-knife-25690

    07/10/2020, 1:43 PM
    Out of curiosity this behaviour, are you doing some macro magic
  • a

    ambitious-knife-25690

    07/10/2020, 1:43 PM
    or is this a haxe feature?
  • u

    user

    07/10/2020, 1:43 PM
    What behavior?
  • u

    user

    07/10/2020, 1:44 PM
    There is macro magic in haxe material-ui but I'm not sure what part you're talking about
  • a

    ambitious-knife-25690

    07/10/2020, 1:45 PM
    the typedef working with
    theme.spacing()
    . I'm guessing theme.spacing is preinstantiated else where?
  • u

    user

    07/10/2020, 1:47 PM
    That's just a function type definition
  • a

    ambitious-knife-25690

    07/10/2020, 1:47 PM
    my brain is a bit unused to haxe atm as I haven't used it for a few months x_x
  • u

    user

    07/10/2020, 1:47 PM
    theme.spacing() is implemented on js material-ui
  • a

    ambitious-knife-25690

    07/10/2020, 1:48 PM
    aaah, I was expecting that to be a regular extern class definition
  • a

    ambitious-knife-25690

    07/10/2020, 1:48 PM
    haven't seen extern definitions being written out as typedefs
  • a

    ambitious-knife-25690

    07/10/2020, 1:48 PM
    I thought it there was less freedom in that approach
  • a

    ambitious-knife-25690

    07/10/2020, 1:49 PM
    Copy code
    haxe
    width: '50%',
    '[theme.breakpoints.up("sm")]': {
    marginLeft: theme.spacing(1),
      width: 'auto',
    }
  • a

    ambitious-knife-25690

    07/10/2020, 1:49 PM
    For the
    [theme...]
    is this the correct approach to getting it to work?
  • a

    ambitious-knife-25690

    07/10/2020, 1:49 PM
    Just wrap it in quotes?
  • u

    user

    07/10/2020, 1:49 PM
    Oh.. hmm
  • u

    user

    07/10/2020, 1:50 PM
    I don't remember if I added support for that in mui's macro
  • u

    user

    07/10/2020, 1:50 PM
    If I did it's with string interpolation (
    '${them.breakpoints.up("sm")}'
    )
  • u

    user

    07/10/2020, 1:50 PM
    String interpolation is not supposed to work in there but macros can make it work ; I know I did it for classnames lib, I'd have to check for mui
  • a

    ambitious-knife-25690

    07/10/2020, 1:51 PM
    Yeah, there are style definitions like the '&:focus' etc
  • a

    ambitious-knife-25690

    07/10/2020, 1:52 PM
    string interpretation or not, made no difference to the rendered result
  • u

    user

    07/10/2020, 1:52 PM
    I just checked, I didn't add support for string interpolation there
  • u

    user

    07/10/2020, 1:52 PM
    '&:focus':  { ... }
    is implemented, though
  • u

    user

    07/10/2020, 1:52 PM
    Are you using
    Styles.jss({ ... })
    ?
  • a

    ambitious-knife-25690

    07/10/2020, 1:53 PM
    yes
  • u

    user

    07/10/2020, 1:53 PM
    (of course it's not documented inside the repo.. =/ https://gist.github.com/kLabz/20f6e4dece9aa4c256af58514626b66f)
  • u

    user

    07/10/2020, 1:54 PM
    There's no way to make the breakpoints thingy work atm, I need to update Styles.jss macro
  • a

    ambitious-knife-25690

    07/10/2020, 1:54 PM
    that's okii
  • a

    ambitious-knife-25690

    07/10/2020, 1:54 PM
    if you want a testcase
  • a

    ambitious-knife-25690

    07/10/2020, 1:54 PM
1...495051...80Latest