Skip to content

@global is not working #76

@caub

Description

@caub

demo: https://codesandbox.io/s/async-sky-5xyhv

body doesn't have a lightblue background as expected

import React from "react";
import ReactDOM from "react-dom";

import styled from 'styled-jss';

function App(props) {
  return (
    <div {...props}>
      <h1>Hello CodeSandbox</h1>
      <h2>Start editing to see some magic happen!</h2>
    </div>
  );
}


const StyledApp = styled(App)({
  border: '1px solid red',
  '@global': {
    body: {
      backgroundColor: 'lightblue'
    }
  }
})

const rootElement = document.getElementById("root");
ReactDOM.render(<StyledApp />, rootElement);

styled-jss: 2.2.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions