Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ant design global styles are leaked through this package #20

Closed
Jokinen opened this issue Aug 15, 2018 · 1 comment
Closed

Ant design global styles are leaked through this package #20

Jokinen opened this issue Aug 15, 2018 · 1 comment

Comments

@Jokinen
Copy link
Contributor

Jokinen commented Aug 15, 2018

Hello again!

I don't know if you have noticed, but Ant design leaks some global style definitions such as reset styles. There's quite an extensive issue about it in antd's repository which gives some background:
ant-design/ant-design#4331

The problem is that this library imports directly from within the index of the antd package:

import React, {Component} from 'react'
import {PropTypes} from 'prop-types'
import {Row, Col, Icon, Radio, Popover, Calendar} from 'antd'
import EventItem from './EventItem'

Which means that the global reset styles are applied on all projects which use this library. For instance with our project links would get coloured unexpectedly as we are using styled-components and have only a few global styles.

I've opened a PR (#19) for this issue which proposes a quite hacky fix. Hopefully it can act as a starting point for resolving this issue.

@Jokinen
Copy link
Contributor Author

Jokinen commented Oct 30, 2018

I'm hopeful that the fix will work! We used it with a forked version for a single proof-of-concept project, but didn't need to do a lot of builds

@Jokinen Jokinen closed this as completed Oct 30, 2018
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

No branches or pull requests

1 participant