-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Replace some Bootstrap components/classes with Ant analogues #4588
Changes from all commits
b14e53f
94c5c8f
77314ea
c7e1592
f5c12a3
dc6b2a9
a420933
ec2ede4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
@import '~antd/lib/style/core/iconfont'; | ||
@import '~antd/lib/style/core/motion'; | ||
@import '~antd/lib/alert/style/index'; | ||
@import '~antd/lib/input/style/index'; | ||
@import '~antd/lib/input-number/style/index'; | ||
@import '~antd/lib/date-picker/style/index'; | ||
@import '~antd/lib/modal/style/index'; | ||
@import '~antd/lib/tooltip/style/index'; | ||
@import '~antd/lib/select/style/index'; | ||
@import '~antd/lib/checkbox/style/index'; | ||
@import '~antd/lib/upload/style/index'; | ||
@import '~antd/lib/form/style/index'; | ||
@import '~antd/lib/button/style/index'; | ||
@import '~antd/lib/radio/style/index'; | ||
@import '~antd/lib/time-picker/style/index'; | ||
@import '~antd/lib/pagination/style/index'; | ||
@import '~antd/lib/table/style/index'; | ||
@import '~antd/lib/popover/style/index'; | ||
@import '~antd/lib/icon/style/index'; | ||
@import '~antd/lib/tag/style/index'; | ||
@import '~antd/lib/grid/style/index'; | ||
@import '~antd/lib/switch/style/index'; | ||
@import '~antd/lib/empty/style/index'; | ||
@import '~antd/lib/drawer/style/index'; | ||
@import '~antd/lib/card/style/index'; | ||
@import '~antd/lib/steps/style/index'; | ||
@import '~antd/lib/divider/style/index'; | ||
@import '~antd/lib/dropdown/style/index'; | ||
@import '~antd/lib/menu/style/index'; | ||
@import '~antd/lib/list/style/index'; | ||
@import "~antd/lib/style/core/iconfont"; | ||
@import "~antd/lib/style/core/motion"; | ||
@import "~antd/lib/alert/style/index"; | ||
@import "~antd/lib/input/style/index"; | ||
@import "~antd/lib/input-number/style/index"; | ||
@import "~antd/lib/date-picker/style/index"; | ||
@import "~antd/lib/modal/style/index"; | ||
@import "~antd/lib/tooltip/style/index"; | ||
@import "~antd/lib/select/style/index"; | ||
@import "~antd/lib/checkbox/style/index"; | ||
@import "~antd/lib/upload/style/index"; | ||
@import "~antd/lib/form/style/index"; | ||
@import "~antd/lib/button/style/index"; | ||
@import "~antd/lib/radio/style/index"; | ||
@import "~antd/lib/time-picker/style/index"; | ||
@import "~antd/lib/pagination/style/index"; | ||
@import "~antd/lib/table/style/index"; | ||
@import "~antd/lib/popover/style/index"; | ||
@import "~antd/lib/icon/style/index"; | ||
@import "~antd/lib/tag/style/index"; | ||
@import "~antd/lib/grid/style/index"; | ||
@import "~antd/lib/switch/style/index"; | ||
@import "~antd/lib/empty/style/index"; | ||
@import "~antd/lib/drawer/style/index"; | ||
@import "~antd/lib/card/style/index"; | ||
@import "~antd/lib/steps/style/index"; | ||
@import "~antd/lib/divider/style/index"; | ||
@import "~antd/lib/dropdown/style/index"; | ||
@import "~antd/lib/menu/style/index"; | ||
@import "~antd/lib/list/style/index"; | ||
@import "~antd/lib/badge/style/index"; | ||
@import "~antd/lib/card/style/index"; | ||
@import "~antd/lib/spin/style/index"; | ||
|
@@ -36,7 +36,7 @@ | |
@import "~antd/lib/collapse/style/index"; | ||
@import "~antd/lib/progress/style/index"; | ||
@import "~antd/lib/typography/style/index"; | ||
@import 'inc/ant-variables'; | ||
@import "inc/ant-variables"; | ||
|
||
// Increase z-indexes to avoid conflicts with some other libraries (e.g. Plotly) | ||
@zindex-modal: 2000; | ||
|
@@ -237,11 +237,11 @@ | |
&-item { | ||
// custom rule | ||
&.selected { | ||
background-color: #F6F8F9; | ||
background-color: #f6f8f9; | ||
} | ||
|
||
&.disabled { | ||
background-color: fade(#F6F8F9, 40%); | ||
background-color: fade(#f6f8f9, 40%); | ||
|
||
& > * { | ||
opacity: 0.4; | ||
|
@@ -250,6 +250,31 @@ | |
} | ||
} | ||
|
||
.@{list-prefix-cls}-bordered.@{list-prefix-cls}-sm { | ||
.@{list-prefix-cls}-item-link { | ||
padding: 0; | ||
|
||
> a { | ||
display: block; | ||
flex: 1 1 auto; | ||
padding: 8px 16px; | ||
cursor: pointer; | ||
text-decoration: none; | ||
color: inherit; | ||
|
||
&:hover, | ||
&:active { | ||
background: fade(@redash-gray, 5%); | ||
} | ||
|
||
&.inactive { | ||
cursor: not-allowed; | ||
background: fade(@redash-gray, 5%); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.@{dialog-prefix-cls} { | ||
// styling for short modals (no lines) | ||
&.shortModal { | ||
|
@@ -367,7 +392,7 @@ | |
top: auto !important; | ||
bottom: 8px; | ||
|
||
// makes the icon white instead of see-through | ||
// makes the icon white instead of see-through | ||
& svg { | ||
background: white; | ||
border-radius: 50%; | ||
|
@@ -394,9 +419,16 @@ | |
} | ||
|
||
// overrides for checkbox | ||
@checkbox-prefix-cls: ~'@{ant-prefix}-checkbox'; | ||
@checkbox-prefix-cls: ~"@{ant-prefix}-checkbox"; | ||
|
||
.@{checkbox-prefix-cls}-wrapper + span, | ||
.@{checkbox-prefix-cls} + span { | ||
padding-right: 0; | ||
} | ||
|
||
// set some defaults for badge | ||
.@{badge-prefix-cls} { | ||
&-count { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The actual change, other is from Prettier |
||
background: @processing-color; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import '../assets/less/ant'; | ||
@import "../assets/less/ant"; | ||
|
||
.parameter-block { | ||
display: inline-block; | ||
|
@@ -20,27 +20,43 @@ | |
} | ||
|
||
&.parameter-dragged { | ||
box-shadow: 0 4px 9px -3px rgba(102, 136, 153, 0.15); | ||
box-shadow: 0 4px 9px -3px rgba(102, 136, 153, 0.15); | ||
} | ||
} | ||
|
||
.parameter-heading { | ||
display: flex; | ||
align-items: center; | ||
justify-content: stretch; | ||
padding-bottom: 4px; | ||
|
||
label { | ||
flex: 1 1 auto; | ||
margin-bottom: 1px; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
min-width: 100%; | ||
max-width: 195px; | ||
white-space: nowrap; | ||
|
||
.parameter-block[data-editable] & { | ||
min-width: calc(100% - 27px); // make room for settings button | ||
max-width: 195px - 27px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be trickier to reach the same Label behavior for parameters: The idea is to keep it with a flexible width, if the label itself has more text and the width is not in it's limit, the whole parameter can take up more space 🙂. You couldn't get it to work with the previous css or you just wanted to move it to flex? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to make it flex (and get rid of |
||
position: relative; | ||
|
||
&:before { | ||
content: "Ij"; // placeholder | ||
visibility: hidden; | ||
} | ||
|
||
span { | ||
position: absolute; | ||
left: 0; | ||
right: 0; | ||
|
||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} | ||
} | ||
|
||
.ant-btn { | ||
flex: 0 0 auto; | ||
margin-left: 5px; | ||
padding: 0 !important; | ||
width: 26px; | ||
text-align: center; | ||
} | ||
} | ||
|
||
|
@@ -88,7 +104,9 @@ | |
height: 27px; | ||
} | ||
|
||
&:hover, &:focus, &:active { | ||
&:hover, | ||
&:focus, | ||
&:active { | ||
background-color: #eef7fe; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual change, other is from Prettier