Skip to content

Releases: lxsmnsyc/solid-styled

v0.2.0

19 Jan 03:09
Compare
Choose a tag to compare
  • Add @global. This feature allows grouping and declaring global styles.
css`
  /* this is global */
  @global {
    body {
      background-color: black;
    }

    main {
      padding: 0.5rem;
    }
  }

  h1 {
    color: white;
  }
`;
  • Add use:solid-styled. Allows forwarding scope instance to components that aren't affected by the scope during compile-time.
css`
  * {
    color: red;
  }
`;

<Dynamic component={props.as} use:solid-styled>
  {props.children}
</Dynamic>

which compiles into

useSolidStyled('xxxx', 'yyyy', vars, '*{color:red}');

<Dynamic component={props.as} data-s-xxxx="yyyy">
  {props.children}
</Dynamic>
  • Fix generated CSS variables to have s- prefix.
  • Fix static sheets to not generate tracking functions. This allows skipping the internal createEffect call for reacting and applying CSS variable patching.
  • Fix JSX transform creating scope even if function doesn't have css declaration.