Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global styles get added as quoted strings. #238

Closed
Froncz opened this issue Apr 7, 2021 · 6 comments
Closed

Global styles get added as quoted strings. #238

Froncz opened this issue Apr 7, 2021 · 6 comments

Comments

@Froncz
Copy link

Froncz commented Apr 7, 2021

Hi. After updating the module, we've started facing the problem with global styles. They get added as camel-cased quoted strings.

Have anyone the same problem?

image
image

@Freddy03h
Copy link
Contributor

Freddy03h commented Apr 22, 2021

I face the same problem.

@giraud
Copy link
Owner

giraud commented Apr 26, 2021

if I change the current App.res in dev-server-emotion to :

open CssJs
global(. "*", [
    margin(#zero), padding(#zero), backgroundColor(lavender), marginTop(10->px), fontFamily(#custom("Source Sans Pro"))
])

I get correct names:
image

what version are you using ?

@rolandpeelen
Copy link

rolandpeelen commented May 26, 2021

Same here. Also, none of our global styles are working anymore - we think this might be related. @giraud 's fix works, but it's not ideal.

From:

Css.(
  global(
    "html",
    [
      boxSizing(`borderBox),
      selector("*, *:before, *:after", [boxSizing(`inherit_)]),
      selector("::-webkit-scrollbar", [background(`transparent)]),
    ],
  )
);

To:

CssJs.(
  global(.
    "html",
    [|
      boxSizing(`borderBox),
      selector("*, *:before, *:after", [|boxSizing(`inherit_)|]),
      selector("::-webkit-scrollbar", [|background(`transparent)|]),
    |],
  )
);

@giraud
Copy link
Owner

giraud commented May 26, 2021

@rolandpeelen what do you mean ? switching from Css to CssJs is the fix ?

@rolandpeelen
Copy link

rolandpeelen commented Jun 3, 2021

@giraud - For us, for just the global Css variants, switching to CssJs / calling it uncurried works (we only have two global css statements, so that's fine).

@giraud
Copy link
Owner

giraud commented Jun 3, 2021

ah yes, there is a diff in impl:

js:
image

legacy:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants