atomic-layout icon indicating copy to clipboard operation
atomic-layout copied to clipboard

Prevent polluting the DOM with unknown attributes

Open kettanaito opened this issue 5 years ago • 0 comments

Changes

  • Manually filters out semantically invalid attributes from Box, Composition, and other styled components exported by the library. The same approach is used in Emotion, which prunes invalid props by default.

There is no built-in API in styled-components, only an active (?) discussion regarding the matter.

Issues

  • Closes #301
  • https://github.com/styled-components/styled-components/issues/439

Release version

  • [ ] internal (no release required)
  • [x] patch (bug fixes)
  • [ ] minor (backward-compatible changes)
  • [ ] major (backward-incompatible, breaking changes)

Contributor's checklist

  • [ ] My branch is up-to-date with the latest master
  • [ ] I ran yarn verify to see the build and tests pass

kettanaito avatar Feb 12 '20 08:02 kettanaito