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

prefixCls is not inherited in some components #10855

Closed
1 of 6 tasks
yesmeck opened this issue Jun 9, 2018 · 4 comments
Closed
1 of 6 tasks

prefixCls is not inherited in some components #10855

yesmeck opened this issue Jun 9, 2018 · 4 comments
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive IssueHuntFest

Comments

@yesmeck
Copy link
Member

yesmeck commented Jun 9, 2018

This is an umbrella issue to track the problem of prefixCls.

@yesmeck yesmeck changed the title prefixCls is not inherited in most compoents prefixCls is not inherited in some components Jun 9, 2018
@chungwong
Copy link

I believe Input should be included on the list as well.

When using import 'antd/dist/antd.less' or import 'antd/lib/input/style';

.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    line-height: 0;
    color: rgba(0, 0, 0, 0.65);
}

While using import 'antd/dist/antd.css' would have the browser specific prefix

.ant-input-affix-wrapper .ant-input-prefix, .ant-input-affix-wrapper .ant-input-suffix {
    position: absolute;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    line-height: 0;
    color: rgba(0, 0, 0, 0.65);
}

@yesmeck yesmeck mentioned this issue Jul 31, 2018
10 tasks
@afc163 afc163 added help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. and removed Inactive labels Oct 12, 2018
@yesmeck
Copy link
Member Author

yesmeck commented Oct 12, 2018

@chungwong Not the same issue.

@yesmeck
Copy link
Member Author

yesmeck commented Oct 17, 2018

From internal discussions:

We'll introduce a new provider called ConfigProvider for the configuration of prefixCls.

import { ConfigProvider, Button } from 'antd';

<ConfigProvider prefixCls="awesome-">
  <Button>A Button</Button>
</ConfigProvider

produces:

<button type="button" class="awesome-btn"><span>A Button</span></button>

@afc163
Copy link
Member

afc163 commented Feb 21, 2019

It is resolved via #12991

@afc163 afc163 closed this as completed Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. Inactive IssueHuntFest
Projects
None yet
Development

No branches or pull requests

4 participants