-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[frontend] add ant design library (#2996)
[frontend] add bootstrap reset/revert styles
- Loading branch information
Showing
9 changed files
with
1,555 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
desktop/core/src/desktop/static/desktop/less/reset-globals.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Reset global styles from Bootstrap to prevent them from | ||
// interfering with the Antd styles. | ||
div, | ||
span, | ||
applet, | ||
object, | ||
iframe, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
p, | ||
blockquote, | ||
pre, | ||
a, | ||
abbr, | ||
acronym, | ||
address, | ||
big, | ||
cite, | ||
code, | ||
del, | ||
em, | ||
img, | ||
ins, | ||
kbd, | ||
q, | ||
s, | ||
samp, | ||
small, | ||
strike, | ||
strong, | ||
sub, | ||
sup, | ||
tt, | ||
var, | ||
b, | ||
u, | ||
i, | ||
center, | ||
dl, | ||
dt, | ||
dd, | ||
ol, | ||
ul, | ||
li, | ||
fieldset, | ||
form, | ||
label, | ||
legend, | ||
table, | ||
caption, | ||
tbody, | ||
tfoot, | ||
thead, | ||
tr, | ||
th, | ||
td, | ||
article, | ||
aside, | ||
canvas, | ||
details, | ||
embed, | ||
figure, | ||
figcaption, | ||
footer, | ||
header, | ||
menu, | ||
nav, | ||
output, | ||
section, | ||
summary, | ||
time, | ||
mark, | ||
audio, | ||
video { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
font-size: 100%; | ||
font-style: inherit; | ||
font-variant: inherit; | ||
font-weight: inherit; | ||
line-height: inherit; | ||
font-family: inherit; | ||
} |
19 changes: 19 additions & 0 deletions
19
desktop/core/src/desktop/static/desktop/less/root-wrapped-antd.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// The Ant Design library modifies the global styles which will affect the UI in Hue | ||
// in multiple places where not intended. So in order to utilize the components locally | ||
// without leaking styles we wrap it all in an antd class. | ||
.antd { | ||
/* stylelint-disable no-invalid-position-at-import-rule */ | ||
|
||
// We need to reset some global styles from Bootstrap to prevent them from | ||
// interfering with the Antd styles | ||
@import './reset-globals.less'; | ||
|
||
// Import global antd styles | ||
@root-entry-name: variable; | ||
@import 'node_modules/antd/es/style/core/index.less'; | ||
@import 'node_modules/antd/es/style/themes/default.less'; | ||
|
||
// Import the styles for the actual components used | ||
@import 'node_modules/antd/es/button/style/index.less'; | ||
/* stylelint-enable no-invalid-position-at-import-rule */ | ||
} |
Oops, something went wrong.