From e26eb5f89272452bc3132d05a99176f9be1ab412 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Sun, 10 May 2020 22:11:09 +0800 Subject: [PATCH] docs: optimize site of rtl (#23995) --- components/avatar/demo/basic.md | 4 ++++ components/avatar/demo/type.md | 4 ++++ components/date-picker/index.en-US.md | 3 +++ components/date-picker/index.zh-CN.md | 3 +++ components/dropdown/demo/placement.md | 5 +++++ components/icon/demo/basic.md | 4 ++++ components/icon/demo/custom.md | 4 ++++ components/input-number/demo/size.md | 4 ++++ components/select/demo/size.md | 4 ++++ components/time-picker/index.en-US.md | 5 ++++- components/time-picker/index.zh-CN.md | 5 ++++- site/theme/static/icons.less | 5 +++++ 12 files changed, 48 insertions(+), 2 deletions(-) diff --git a/components/avatar/demo/basic.md b/components/avatar/demo/basic.md index 5b5b26cbc6..2b0d5c0576 100644 --- a/components/avatar/demo/basic.md +++ b/components/avatar/demo/basic.md @@ -41,4 +41,8 @@ ReactDOM.render( margin-top: 16px; margin-right: 16px; } +.ant-row-rtl #components-avatar-demo-basic .ant-avatar { + margin-right: 0; + margin-left: 16px; +} diff --git a/components/avatar/demo/type.md b/components/avatar/demo/type.md index 181e1e260e..7df106b094 100644 --- a/components/avatar/demo/type.md +++ b/components/avatar/demo/type.md @@ -35,4 +35,8 @@ ReactDOM.render( margin-top: 16px; margin-right: 16px; } +.ant-row-rtl #components-avatar-demo-type .ant-avatar { + margin-right: 0; + margin-left: 16px; +} diff --git a/components/date-picker/index.en-US.md b/components/date-picker/index.en-US.md index 2bd43ec435..e3db07a027 100644 --- a/components/date-picker/index.en-US.md +++ b/components/date-picker/index.en-US.md @@ -162,6 +162,9 @@ Added in `4.1.0`. .code-box-demo .ant-picker { margin: 0 8px 12px 0; } +.ant-row-rtl .code-box-demo .ant-picker { + margin: 0 0 12px 8px; +} ## FAQ diff --git a/components/date-picker/index.zh-CN.md b/components/date-picker/index.zh-CN.md index bf3c0552e4..36ae04d70f 100644 --- a/components/date-picker/index.zh-CN.md +++ b/components/date-picker/index.zh-CN.md @@ -164,6 +164,9 @@ import 'moment/locale/zh-cn'; .code-box-demo .ant-picker { margin: 0 8px 12px 0; } +.ant-row-rtl .code-box-demo .ant-picker { + margin: 0 0 12px 8px; +} ## FAQ diff --git a/components/dropdown/demo/placement.md b/components/dropdown/demo/placement.md index e3ff10a5f0..fa6f5270ec 100644 --- a/components/dropdown/demo/placement.md +++ b/components/dropdown/demo/placement.md @@ -67,4 +67,9 @@ ReactDOM.render( margin-right: 8px; margin-bottom: 8px; } +.ant-row-rtl #components-dropdown-demo-placement .ant-btn { + margin-right: 0; + margin-bottom: 8px; + margin-left: 8px; +} ``` diff --git a/components/icon/demo/basic.md b/components/icon/demo/basic.md index 5fc77895d4..af2f66304d 100644 --- a/components/icon/demo/basic.md +++ b/components/icon/demo/basic.md @@ -40,4 +40,8 @@ ReactDOM.render( margin-right: 6px; font-size: 24px; } +.ant-row-rtl .icons-list > .anticon { + margin-right: 0; + margin-left: 6px; +} diff --git a/components/icon/demo/custom.md b/components/icon/demo/custom.md index aaeac57a5f..054ee07763 100644 --- a/components/icon/demo/custom.md +++ b/components/icon/demo/custom.md @@ -84,4 +84,8 @@ ReactDOM.render( .custom-icons-list > .anticon { margin-right: 6px; } +.ant-row-rtl .custom-icons-list > .anticon { + margin-right: 0; + margin-left: 6px; +} ``` diff --git a/components/input-number/demo/size.md b/components/input-number/demo/size.md index d5f2a4cf67..301ce9290f 100644 --- a/components/input-number/demo/size.md +++ b/components/input-number/demo/size.md @@ -34,4 +34,8 @@ ReactDOM.render( .code-box-demo .ant-input-number { margin-right: 10px; } +.ant-row-rtl .code-box-demo .ant-input-number { + margin-right: 0; + margin-left: 10px; +} ``` diff --git a/components/select/demo/size.md b/components/select/demo/size.md index 99b1514ea1..798c0187bf 100644 --- a/components/select/demo/size.md +++ b/components/select/demo/size.md @@ -85,6 +85,10 @@ ReactDOM.render(, mountNode); margin: 0 8px 10px 0; } +.ant-row-rtl .code-box-demo .ant-select { + margin: 0 0 10px 8px; +} + #components-select-demo-search-box .code-box-demo .ant-select { margin: 0; } diff --git a/components/time-picker/index.en-US.md b/components/time-picker/index.en-US.md index 41019e348d..fe38cc5995 100644 --- a/components/time-picker/index.en-US.md +++ b/components/time-picker/index.en-US.md @@ -68,7 +68,10 @@ Same props from [RangePicker](/components/date-picker/#RangePicker) of DatePicke | -------- | ------------------------ | ------- | ------- | ------- | | order | Order start and end time | boolean | true | 4.1.0 | - + ## FAQ diff --git a/components/time-picker/index.zh-CN.md b/components/time-picker/index.zh-CN.md index c7ceb9b9a0..dffe7d67b6 100644 --- a/components/time-picker/index.zh-CN.md +++ b/components/time-picker/index.zh-CN.md @@ -68,7 +68,10 @@ import moment from 'moment'; | ----- | -------------------- | ------- | ------ | ----- | | order | 始末时间是否自动排序 | boolean | true | 4.1.0 | - + ## FAQ diff --git a/site/theme/static/icons.less b/site/theme/static/icons.less index f09762d68e..f5d647c703 100644 --- a/site/theme/static/icons.less +++ b/site/theme/static/icons.less @@ -1,6 +1,7 @@ ul.anticons-list { margin: 10px 0; overflow: hidden; + direction: ltr; list-style: none; li { position: relative; @@ -17,6 +18,10 @@ ul.anticons-list { border-radius: 4px; cursor: pointer; transition: color 0.3s ease-in-out, background-color 0.3s ease-in-out; + .rtl & { + margin: 3px 0; + padding: 10px 0 0; + } .anticon { margin: 12px 0 8px; font-size: 36px;