Skip to content

Update dependency styled-components to v6.3.12#392

Open
renovate[bot] wants to merge 1 commit intomainfrom
renovate/styled-components-6.x
Open

Update dependency styled-components to v6.3.12#392
renovate[bot] wants to merge 1 commit intomainfrom
renovate/styled-components-6.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Nov 8, 2023

This PR contains the following updates:

Package Change Age Confidence
styled-components (source) 6.1.06.3.12 age confidence

Release Notes

styled-components/styled-components (styled-components)

v6.3.12

Compare Source

Patch Changes
  • db4f940: Fix test performance regression in 6.3.x by eliminating double style rendering in createGlobalStyle and removing unnecessary DOM queries during cleanup in client/test environments.
  • 1203f80: Fix React Native crash caused by document references in the native build. The native bundle no longer includes DOM code, resolving compatibility with RN 0.79+ and Hermes.
  • 5ef3804: Gracefully handle CSS syntax errors in React Native instead of crashing. Missing semicolons and other syntax issues now log a warning in development and produce an empty style object instead of throwing a fatal error.
  • a777f5a: Preserve explicitly passed undefined props instead of stripping them. This fixes compatibility with libraries like MUI and Radix UI that pass undefined to reset inherited defaults (e.g., role={undefined}). Props set to undefined via .attrs() are still stripped as before.

v6.3.11

Compare Source

Patch Changes
  • 752f5ec: fix: resolve "React is not defined" ReferenceError introduced in 6.3.10 when loading the CJS build in Node.js

v6.3.10

Compare Source

Patch Changes
  • f674224: fix: RSC style tags for extended components have correct href and include base CSS (#​5663)

    • Fix spaces in <style href> attribute that caused React 19 hydration failures when using styled() inheritance
    • Fix missing base component CSS in RSC output when only the extended component renders
    • Emit a separate <style> tag per inheritance level with content-aware hrefs, enabling React 19 deduplication of shared base styles
    • Preserve correct CSS ordering (base before extended) for proper specificity override behavior
  • f674224: Reduce standalone/browser bundle size by making IS_RSC a build-time constant, enabling dead code elimination of RSC-specific branches

v6.3.9

Compare Source

Patch Changes
  • ca61aca: Fix CSS block comments containing // (e.g. URLs) causing subsequent styles to not be applied.
  • a2cd792: Fix createGlobalStyle styles not being removed when unmounted in RSC environments. React 19's precedence attribute on style tags makes them persist as permanent resources; global styles now render without precedence so they follow normal component lifecycle.
  • dbe0aae: In RSC environments, theme is now undefined instead of {} for styled components, matching the existing behavior of withTheme and createGlobalStyle. This ensures accessing theme properties without a ThemeProvider correctly throws rather than silently returning undefined.
  • 1888c73: Fix withTheme HOC types: ref now correctly resolves to the component instance type instead of the constructor, and theme is properly optional in the wrapped component's props.
  • f84f3fa: Fix SSR styles hydration and global style cleanup in Shadow DOM
  • 43a5b4b: Optimize internal style processing hot paths: cached GroupedTag index lookups, string fast path in flatten, direct string concatenation in dynamic style generation, pre-built stylis middleware chain with lazy RegExp creation, single-lookup Map operations, VirtualTag append fast-path, and manual string concat in SSR output.
  • 788e8c0: Revert exports field and restore browser/server build split with browser field in package.json. Fixes require('stream') resolution errors in browser bundlers like webpack 5.

v6.3.8

Compare Source

Patch Changes
  • 55d05c1: Make react-dom an optional peer dependency, clean up some unnecessary type peers.

v6.3.7

Compare Source

Patch Changes
  • 51ffa9c: Fix createGlobalStyle compatibility with React StrictMode and RSC

    This fix addresses issues where global styles would disappear or behave incorrectly in React StrictMode and RSC:

    1. Static styles optimization: Static global styles (without props/interpolations) are now only injected once and won't be removed/re-added on every render. This prevents the style flickering that could occur during concurrent rendering.

    2. StrictMode-aware cleanup: Style cleanup now uses queueMicrotask to coordinate with React's effect lifecycle. In StrictMode's simulated unmount/remount cycle, styles are preserved. On real unmount, styles are properly removed.

    3. RSC compatibility: Move useRef inside RSC guard in createGlobalStyle and unify all useContext calls to use consistent !IS_RSC ? pattern.

    4. RSC inline style tag cleanup: Fix bug where server-defined createGlobalStyle rendered in client components would leave behind accumulated SSR-rendered inline <style data-styled-global> tags. The cleanup effect now removes these hoisted style tags when the component unmounts or re-renders with different CSS.

    These changes ensure createGlobalStyle works correctly with:

    • React StrictMode's double-render behavior
    • React 18/19's concurrent rendering features
    • React 19's style hoisting with the precedence attribute
    • React Server Components (server-defined GlobalStyles in client components)
  • 51ffa9c: Restore styled.br.

  • 1f794b7: Add package.json "exports" field for better native ESM integration.

v6.3.6

Compare Source

Patch Changes
  • 189bc17: Fix url() CSS function values being incorrectly stripped when using unquoted URLs containing // (e.g., url(https://example.com)). The // in protocol URLs like https://, http://, file://, and protocol-relative URLs was incorrectly being treated as a JavaScript-style line comment.

v6.3.5

Compare Source

Patch Changes
  • 7ff7002: Fix: Line comments (//) in multiline CSS declarations no longer cause parsing errors (fixes #​5613)

    JS-style line comments (//) placed after multiline declarations like calc() were not being properly stripped, causing CSS parsing issues. Comments are now correctly removed anywhere in the CSS while preserving valid syntax.

    Example that now works:

    const Box = styled.div`
      max-height: calc(100px + 200px + 300px); // This comment no longer breaks parsing
      background-color: green;
    `;
  • 7ff7002: Fix: Contain invalid CSS syntax to just the affected line

    In styled-components v6, invalid CSS syntax (like unbalanced braces) could cause all subsequent styles to be ignored. This fix ensures that malformed CSS only affects the specific declaration, not subsequent valid styles.

    Example that now works:

    const Circle = styled.div`
      width: 100px;
      line-height: ${() => '14px}'}; // ⛔️ This malformed line is dropped
      background-color: green; // ✅ Now preserved (was ignored in v6)
    `;

v6.3.4

Compare Source

Patch Changes
  • 8e8c282: Fixed createGlobalStyle to not use useLayoutEffect on the server, which was causing a warning and broken styles in v6.3.x. The check typeof React.useLayoutEffect === 'function' is not reliable for detecting server vs client environments in React 18+, so we now use the __SERVER__ build constant instead.

v6.3.3

Compare Source

Patch Changes
  • 6e4d1e7: fix: suppress false "created dynamically" warnings in React Server Components

    The dynamic creation warning check now properly detects RSC environments and skips validation when IS_RSC is true. This eliminates false warnings for module-level styled components in server components, which were incorrectly flagged due to RSC's different module evaluation context. Module-level styled components in RSC files no longer trigger warnings since they cannot be created inside render functions by definition.

v6.3.2

Compare Source

Patch Changes
  • a4b4a6b: fix: include TypeScript declaration files in npm package

    Fixed Rollup TypeScript plugin configuration to override tsconfig.json's noEmit setting, ensuring TypeScript declaration files are generated during build.

  • a4b4a6b: fix: resolve TypeScript error blocking type declaration emission

    Fixed TypeScript error in StyledComponent when merging style attributes from attrs. Added explicit type cast to React.CSSProperties to safely merge CSS property objects. This error was preventing TypeScript declaration files from being generated during build.

v6.3.1

Compare Source

Patch Changes
  • 046e880: Ensure TypeScript declaration files are included in npm package, needed to tweak a Rollup setting.

v6.3.0

Compare Source

Minor Changes
  • 28fd502: Add React Server Components (RSC) support

    styled-components now automatically detects RSC environments and handles CSS delivery appropriately:

    • No 'use client' directive required: Components work in RSC without any wrapper or directive
    • Automatic CSS injection: In RSC mode, styled components emit inline <style> tags that React 19 automatically hoists and deduplicates
    • Zero configuration: Works out of the box with Next.js App Router and other RSC-enabled frameworks
    • Backward compatible: Existing SSR patterns with ServerStyleSheet continue to work unchanged

    RSC best practices:

    • Prefer static styles over dynamic interpolations to avoid serialization overhead
    • Use data attributes for discrete variants (e.g., &[data-size='lg'])
    • CSS custom properties work perfectly in styled-components, can be set via inline style, and cascade to children:
    const Container = styled.div``;
    const Button = styled.button`
      background: var(--color-primary, blue);
    `;
    
    // Variables set on parent cascade to all DOM children
    <Container style={{ '--color-primary': 'orchid' }}>
      <Button>Inherits orchid background</Button>
    </Container>;
    • Use build-time CSS variable generation for theming since ThemeProvider is a no-op in RSC

    Technical details:

    • RSC detection via typeof React.createContext === 'undefined'
    • ThemeProvider and StyleSheetManager become no-ops in RSC (children pass-through)
    • React hooks are conditionally accessed via runtime guards
    • CSS is retrieved from the StyleSheet Tag for inline delivery in RSC mode
  • 856cf06: feat: update built-in element aliases to include modern HTML and SVG elements

    Added support for modern HTML and SVG elements that were previously missing:

    HTML elements:

    • search - HTML5 search element
    • slot - Web Components slot element
    • template - HTML template element

    SVG filter elements:

    • All fe* filter primitive elements (feBlend, feColorMatrix, feComponentTransfer, etc.)
    • clipPath, linearGradient, radialGradient - gradient and clipping elements
    • textPath - SVG text path element
    • switch, symbol, use - SVG structural elements

    This ensures styled-components has comprehensive coverage of all styleable HTML and SVG elements supported by modern browsers and React.

Patch Changes
  • 418adbe: fix(types): add CSS custom properties (variables) support to style prop

    CSS custom properties (CSS variables like --primary-color) are now fully supported in TypeScript without errors:

    • .attrs({ style: { '--var': 'value' } }) - CSS variables in attrs
    • <Component style={{ '--var': 'value' }} /> - CSS variables in component props
    • Mixed usage with regular CSS properties works seamlessly
  • aef2ad6: Update shared css property handling tools to latest versions.

v6.2.0

Compare Source

v6.1.19

Compare Source

Patch Changes
  • aa997d8: fix for React Native >=0.79 crashes when using unsupported web-only CSS values (e.g., fit-content, min-content, max-content). The fix emits a warning and ignores the property using those values, instead of causing crashes.

v6.1.18

Compare Source

Patch Changes
  • 76b18a4: fix react 19 compatibility
  • bdac7af: Quickfix to support expo sdk >= 53 and react-native >=0.79.

v6.1.17

Compare Source

Patch Changes
  • 47a4dcb: Fix for loose DefaultTheme type definition
  • a8c0f5b: fix: add info link to console

v6.1.16

Compare Source

Patch Changes
  • 246c77b: Resolve TS error related to ExoticComponentWithDisplayName API from React.
  • 4757191: Native typings weren't on the correct folder, which caused issues on React Native projects using this library

v6.1.15

Compare Source

Patch Changes
  • b9688ae: chore: update postcss to version 8.4.49 and nanoid to version 3.3.8

v6.1.14

Compare Source

Patch Changes
  • 6908326: Add changesets for release management
  • 18ebf6d: Prevent styled() from injecting an undefined ref prop in React 19

v6.1.13

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.12...v6.1.13

v6.1.12

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.11...v6.1.12

v6.1.11

Compare Source

What's Changed

Full Changelog: styled-components/styled-components@v6.1.10...v6.1.11

v6.1.10

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.9...v6.1.10

v6.1.9

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.8...v6.1.9

v6.1.8

Compare Source

Revert adding peerDependencies from v6.1.7; apparently some package managers have differing behaviors around peerDependenciesMeta[package].optional which is causing issues. Will revisit at a later date if possible.

Full Changelog: styled-components/styled-components@v6.1.7...v6.1.8

v6.1.7

Compare Source

What's Changed

  • chore: add all missing peer dependency statements by @​quantizor in #​4243

    NOTE: this change may cause some installed dependency duplication until this NPM bug is addressed but yarn and pnpm have correct behavior. Bun also has a similar bug.

    Overall these changes ensure that styled-components is specifying a known working version of all utilized libraries, while instructing the client package manager that higher semver-compliant versions are permissible and should work, assuming the relevant libraries are compliant in practice.

Full Changelog: styled-components/styled-components@v6.1.6...v6.1.7

v6.1.6

Compare Source

What's Changed

Full Changelog: styled-components/styled-components@v6.1.5...v6.1.6

v6.1.5

Compare Source

What's Changed

Full Changelog: styled-components/styled-components@v6.1.4...v6.1.5

v6.1.4

Compare Source

What's Changed

Full Changelog: styled-components/styled-components@v6.1.3...v6.1.4

v6.1.3

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.2...v6.1.3

v6.1.2

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.1...v6.1.2

v6.1.1

What's Changed

New Contributors

Full Changelog: styled-components/styled-components@v6.1.0...v6.1.1


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency styled-components to v6.1.1 Update dependency styled-components to v6.1.2 Dec 20, 2023
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from beb3e7a to 661204a Compare December 22, 2023 15:45
@renovate renovate bot changed the title Update dependency styled-components to v6.1.2 Update dependency styled-components to v6.1.3 Dec 22, 2023
@renovate renovate bot changed the title Update dependency styled-components to v6.1.3 Update dependency styled-components to v6.1.4 Dec 27, 2023
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 661204a to 7fb6616 Compare December 27, 2023 10:03
@renovate renovate bot changed the title Update dependency styled-components to v6.1.4 Update dependency styled-components to v6.1.5 Dec 27, 2023
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 7fb6616 to 9aa5c24 Compare December 27, 2023 17:05
@renovate renovate bot changed the title Update dependency styled-components to v6.1.5 Update dependency styled-components to v6.1.6 Dec 27, 2023
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 9aa5c24 to 551ec4e Compare December 27, 2023 22:50
@renovate renovate bot changed the title Update dependency styled-components to v6.1.6 Update dependency styled-components to v6.1.7 Jan 8, 2024
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 551ec4e to 40ab6c7 Compare January 8, 2024 17:20
@renovate renovate bot changed the title Update dependency styled-components to v6.1.7 Update dependency styled-components to v6.1.8 Jan 8, 2024
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 40ab6c7 to dc49b2e Compare January 8, 2024 22:03
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from dc49b2e to 06e203e Compare May 1, 2024 01:01
@renovate renovate bot changed the title Update dependency styled-components to v6.1.8 Update dependency styled-components to v6.1.9 May 1, 2024
@renovate renovate bot changed the title Update dependency styled-components to v6.1.9 Update dependency styled-components to v6.1.10 May 7, 2024
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from b6b6fd9 to 7b98a1b Compare May 9, 2024 20:07
@renovate renovate bot changed the title Update dependency styled-components to v6.1.10 Update dependency styled-components to v6.1.11 May 9, 2024
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 7b98a1b to c40fc18 Compare July 17, 2024 17:48
@renovate renovate bot changed the title Update dependency styled-components to v6.1.11 Update dependency styled-components to v6.1.12 Jul 17, 2024
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from c40fc18 to 027358a Compare August 30, 2024 04:34
@renovate renovate bot changed the title Update dependency styled-components to v6.1.12 Update dependency styled-components to v6.1.13 Aug 30, 2024
@renovate renovate bot changed the title Update dependency styled-components to v6.1.13 Update dependency styled-components to v6.1.14 Jan 4, 2025
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 027358a to 2330be0 Compare January 4, 2025 04:49
@renovate renovate bot changed the title Update dependency styled-components to v6.1.14 Update dependency styled-components to v6.1.15 Feb 5, 2025
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 2330be0 to 11db041 Compare February 5, 2025 17:44
@renovate renovate bot changed the title Update dependency styled-components to v6.1.15 Update dependency styled-components to v6.1.16 Mar 17, 2025
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from cf39e4f to 319068f Compare October 21, 2025 16:13
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 319068f to c8e5124 Compare November 10, 2025 15:16
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from c8e5124 to 666bfdd Compare November 18, 2025 13:00
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 666bfdd to 5eaf736 Compare December 4, 2025 23:45
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from 19204e1 to 86e0d27 Compare January 6, 2026 01:48
@renovate renovate bot changed the title Update dependency styled-components to v6.1.19 Update dependency styled-components to v6.2.0 Jan 6, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 86e0d27 to be7d845 Compare January 8, 2026 19:28
@renovate renovate bot changed the title Update dependency styled-components to v6.2.0 Update dependency styled-components to v6.3.0 Jan 10, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from be7d845 to 212b74b Compare January 10, 2026 09:45
@renovate renovate bot changed the title Update dependency styled-components to v6.3.0 Update dependency styled-components to v6.3.1 Jan 10, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from 5d31af7 to 3b7afbc Compare January 10, 2026 17:42
@renovate renovate bot changed the title Update dependency styled-components to v6.3.1 Update dependency styled-components to v6.3.2 Jan 10, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 3b7afbc to 46bdaf6 Compare January 10, 2026 20:29
@renovate renovate bot changed the title Update dependency styled-components to v6.3.2 Update dependency styled-components to v6.3.3 Jan 10, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 46bdaf6 to 434a6d6 Compare January 11, 2026 04:52
@renovate renovate bot changed the title Update dependency styled-components to v6.3.3 Update dependency styled-components to v6.3.5 Jan 11, 2026
@renovate renovate bot changed the title Update dependency styled-components to v6.3.5 Update dependency styled-components to v6.3.6 Jan 13, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from 434a6d6 to d725941 Compare January 13, 2026 18:34
@renovate renovate bot changed the title Update dependency styled-components to v6.3.6 Update dependency styled-components to v6.3.8 Jan 16, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from d725941 to f93ffc4 Compare January 16, 2026 06:59
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch from f93ffc4 to 9e92f09 Compare January 23, 2026 18:41
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from 8e791fa to 3e87f7e Compare February 8, 2026 04:56
@renovate renovate bot changed the title Update dependency styled-components to v6.3.8 Update dependency styled-components to v6.3.9 Feb 8, 2026
@renovate renovate bot force-pushed the renovate/styled-components-6.x branch 2 times, most recently from 4157ffc to a40f898 Compare February 18, 2026 14:06
@renovate renovate bot changed the title Update dependency styled-components to v6.3.9 Update dependency styled-components to v6.3.10 Feb 18, 2026
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

Successfully merging this pull request may close these issues.

0 participants