sergeysova / styled-normalize Goto Github PK
View Code? Open in Web Editor NEWnormalize.css for styled-components
Home Page: https://npmjs.com/styled-normalize
License: MIT License
normalize.css for styled-components
Home Page: https://npmjs.com/styled-normalize
License: MIT License
Hi,
Just finding it hard to understand how to import styled-normalize and combine it together with createGlobalStyle
. Readme is not good enough to understand, specifically the below code
// ES Modules
import { normalize, Normalize } from 'styled-normalize'
// CommonJS
const { normalize, Normalize } = require('styled-normalize')
createGlobalStyle` ${normalize} `
<Normalize />
What is the last line means? Are you exporting the component ?
It would helpful if there is sample app to see how it works with Styled-Component V4.
your help is really appreciated.
Thanks
Styled Components 5 upgrade needed.
Hello and thanks for creating this package! ๐โโ๏ธ
I tried upgrading styled-normalize from 8.0.2
to 8.0.3
with the latest styled-components@3
. Because
Line 1 in bb1b9e1
styled-components@4
's GlobalStyleClass, DefaultTheme
, which don't exist in v3 - TS compilation fails.
I don't really see a way around this, except for fixing peerDependencies to exclude styled-components@4
in styled-normalize@>=8.0.3
.
I think this also warrants a new major version and unpublishing of [email protected]
, since it's broken for TS users.
in the .babelrc triggers a error
{ "presets": [ ["@babel/env", { "modules": "commonjs" }] ], "plugins": [ "styled-components" ] }
@babel/env doesn't exist this should be @babel/preset-env
{ "presets": [ ["@babel/preset-env", { "modules": "commonjs" }] ], "plugins": [ "styled-components" ] }
Hi,
With 2.0.0 normalize is working well but with 2.0.1 and above the normalize style is cropped after textarea{overflow:auto;}
Is this a bug with styled-normalize or styled-components?
I want to use styled-normalize with babel, but if I use it, I get an Babel error.
ERROR in ./.storybook/config.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] .storybook/config.js: Cannot find module '@babel/helper-compilation-targets'
Require stack:
- node_modules/babel-preset-react-app/node_modules/@babel/preset-env/lib/debug.js
- /node_modules/babel-preset-react-app/node_modules/@babel/preset-env/lib/index.js
...
Can someone help?
Thank you!
I guess original normalize can be installed and imported in Global styles in styled components
https://www.npmjs.com/package/styled-normalize is only showing 8.0.4, and yarn add
installs 8.0.4, which has broken types. I had to install from git, which is totally fine, but you should probably publish the most recent version
I am still on version 3 of styled components and your docs instruct us to install using the @prev
tag, so I did.
8.0.5
is the version that is installed when running npm i styled-normalize@prev
, but it is not compatible with SC v3.
This version does work: npm i [email protected]
and should be tagged as the latest prev
version.
Thanks!
Never seen that before.
Any reason why it's not written as a comment at the top of the file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.