2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2019-02-19 11:42:05 +08:00
|
|
|
@import '../../style/mixins/index';
|
|
|
|
|
|
|
|
@typography-prefix-cls: ~'@{ant-prefix}-typography';
|
|
|
|
|
|
|
|
// =============== Basic ===============
|
|
|
|
.@{typography-prefix-cls} {
|
|
|
|
color: @text-color;
|
2020-07-08 22:33:07 +08:00
|
|
|
overflow-wrap: break-word;
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2019-04-24 15:03:03 +08:00
|
|
|
&&-secondary {
|
2019-02-19 11:42:05 +08:00
|
|
|
color: @text-color-secondary;
|
|
|
|
}
|
|
|
|
|
2020-08-13 10:13:32 +08:00
|
|
|
&&-success {
|
|
|
|
color: @success-color;
|
|
|
|
}
|
|
|
|
|
2019-04-24 15:03:03 +08:00
|
|
|
&&-warning {
|
2019-05-29 19:19:32 +08:00
|
|
|
color: @warning-color;
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
2019-04-24 15:03:03 +08:00
|
|
|
&&-danger {
|
2019-05-29 19:19:32 +08:00
|
|
|
color: @error-color;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-10-13 18:31:48 +08:00
|
|
|
a&:active,
|
|
|
|
a&:focus,
|
2020-10-12 16:24:26 +08:00
|
|
|
a&:hover {
|
|
|
|
color: ~`colorPalette('@{error-color}', 5) `;
|
|
|
|
}
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
2019-04-24 15:03:03 +08:00
|
|
|
&&-disabled {
|
2019-02-19 11:42:05 +08:00
|
|
|
color: @disabled-color;
|
|
|
|
cursor: not-allowed;
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Tag
|
|
|
|
div&,
|
|
|
|
p {
|
|
|
|
.typography-paragraph();
|
|
|
|
}
|
|
|
|
|
|
|
|
h1&,
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h1,
|
|
|
|
div&-h1 > textarea,
|
2019-02-19 11:42:05 +08:00
|
|
|
h1 {
|
|
|
|
.typography-title-1();
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
h2&,
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h2,
|
|
|
|
div&-h2 > textarea,
|
2019-02-19 11:42:05 +08:00
|
|
|
h2 {
|
|
|
|
.typography-title-2();
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
h3&,
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h3,
|
|
|
|
div&-h3 > textarea,
|
2019-02-19 11:42:05 +08:00
|
|
|
h3 {
|
|
|
|
.typography-title-3();
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
h4&,
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h4,
|
|
|
|
div&-h4 > textarea,
|
2019-02-19 11:42:05 +08:00
|
|
|
h4 {
|
|
|
|
.typography-title-4();
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-07-28 20:39:43 +08:00
|
|
|
h5&,
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h5,
|
|
|
|
div&-h5 > textarea,
|
2020-07-28 20:39:43 +08:00
|
|
|
h5 {
|
|
|
|
.typography-title-5();
|
|
|
|
}
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h1,
|
|
|
|
div&-h2,
|
|
|
|
div&-h3,
|
|
|
|
div&-h4,
|
|
|
|
div&-h5 {
|
|
|
|
& > textarea {
|
|
|
|
margin-bottom: 0;
|
|
|
|
padding-top: 0;
|
|
|
|
padding-bottom: 0;
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-04 11:04:20 +08:00
|
|
|
div&-h5 > textarea {
|
|
|
|
padding-top: 3px;
|
|
|
|
}
|
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
div,
|
|
|
|
ul,
|
|
|
|
li,
|
|
|
|
p,
|
|
|
|
h1,
|
|
|
|
h2,
|
|
|
|
h3,
|
2020-07-28 20:39:43 +08:00
|
|
|
h4,
|
|
|
|
h5 {
|
2019-02-19 11:42:05 +08:00
|
|
|
+ h1,
|
|
|
|
+ h2,
|
|
|
|
+ h3,
|
2020-07-28 20:39:43 +08:00
|
|
|
+ h4,
|
|
|
|
+ h5 {
|
2019-02-19 11:42:05 +08:00
|
|
|
margin-top: @typography-title-margin-top;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
a&-ellipsis,
|
2019-02-19 11:42:05 +08:00
|
|
|
span&-ellipsis {
|
|
|
|
display: inline-block;
|
2021-07-20 13:51:03 +08:00
|
|
|
max-width: 100%;
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
a&,
|
2019-02-19 11:42:05 +08:00
|
|
|
a {
|
|
|
|
.operation-unit();
|
2020-09-22 16:57:37 +08:00
|
|
|
text-decoration: @link-decoration;
|
2019-02-19 11:42:05 +08:00
|
|
|
|
|
|
|
&:active,
|
|
|
|
&:hover {
|
|
|
|
text-decoration: @link-hover-decoration;
|
|
|
|
}
|
|
|
|
|
2020-11-13 09:06:35 +08:00
|
|
|
&[disabled],
|
|
|
|
&.@{typography-prefix-cls}-disabled {
|
2019-02-19 11:42:05 +08:00
|
|
|
color: @disabled-color;
|
|
|
|
cursor: not-allowed;
|
2020-11-13 09:06:35 +08:00
|
|
|
|
2020-11-02 10:35:45 +08:00
|
|
|
&:active,
|
|
|
|
&:hover {
|
|
|
|
color: @disabled-color;
|
|
|
|
}
|
2020-11-13 09:06:35 +08:00
|
|
|
|
|
|
|
&:active {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
code {
|
|
|
|
margin: 0 0.2em;
|
|
|
|
padding: 0.2em 0.4em 0.1em;
|
|
|
|
font-size: 85%;
|
2020-05-16 14:43:29 +08:00
|
|
|
background: rgba(150, 150, 150, 0.1);
|
|
|
|
border: 1px solid rgba(100, 100, 100, 0.2);
|
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
kbd {
|
|
|
|
margin: 0 0.2em;
|
|
|
|
padding: 0.15em 0.4em 0.1em;
|
|
|
|
font-size: 90%;
|
|
|
|
background: rgba(150, 150, 150, 0.06);
|
|
|
|
border: 1px solid rgba(100, 100, 100, 0.2);
|
|
|
|
border-bottom-width: 2px;
|
2019-02-19 11:42:05 +08:00
|
|
|
border-radius: 3px;
|
|
|
|
}
|
|
|
|
|
|
|
|
mark {
|
|
|
|
padding: 0;
|
|
|
|
background-color: @gold-3;
|
|
|
|
}
|
|
|
|
|
|
|
|
u,
|
|
|
|
ins {
|
|
|
|
text-decoration: underline;
|
|
|
|
text-decoration-skip-ink: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
s,
|
|
|
|
del {
|
|
|
|
text-decoration: line-through;
|
|
|
|
}
|
|
|
|
|
|
|
|
strong {
|
|
|
|
font-weight: 600;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Operation
|
|
|
|
&-expand,
|
|
|
|
&-edit,
|
|
|
|
&-copy {
|
|
|
|
.operation-unit();
|
|
|
|
|
2020-06-29 12:25:48 +08:00
|
|
|
margin-left: 4px;
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-copy-success {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @success-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Text input area
|
|
|
|
&-edit-content {
|
|
|
|
position: relative;
|
|
|
|
|
2019-03-11 16:00:12 +08:00
|
|
|
div& {
|
|
|
|
left: -@input-padding-horizontal - 1px;
|
|
|
|
margin-top: -@input-padding-vertical-base - 1px;
|
2020-07-30 16:54:49 +08:00
|
|
|
margin-bottom: calc(1em - @input-padding-vertical-base - 1px);
|
2019-03-11 16:00:12 +08:00
|
|
|
}
|
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
&-confirm {
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
bottom: 8px;
|
|
|
|
color: @text-color-secondary;
|
2022-03-04 11:04:20 +08:00
|
|
|
// default style
|
|
|
|
font-weight: normal;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
font-style: normal;
|
2019-02-19 11:42:05 +08:00
|
|
|
pointer-events: none;
|
|
|
|
}
|
2019-12-06 11:45:40 +08:00
|
|
|
|
|
|
|
// Fix Editable Textarea flash in Firefox
|
|
|
|
textarea {
|
2021-10-22 13:35:36 +08:00
|
|
|
/* stylelint-disable-next-line property-no-vendor-prefix */
|
2019-12-06 11:45:40 +08:00
|
|
|
-moz-transition: none;
|
|
|
|
}
|
2022-03-04 11:04:20 +08:00
|
|
|
|
|
|
|
.@{typography-prefix-cls}& {
|
|
|
|
&.@{typography-prefix-cls}-h1,
|
|
|
|
&.@{typography-prefix-cls}-h2,
|
|
|
|
&.@{typography-prefix-cls}-h3 {
|
|
|
|
margin-top: -1px;
|
|
|
|
margin-bottom: calc(@typography-title-margin-bottom - 1px);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.@{typography-prefix-cls}-h4 {
|
|
|
|
margin-top: -2px;
|
|
|
|
margin-bottom: calc(@typography-title-margin-bottom - 2px);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.@{typography-prefix-cls}-h5 {
|
|
|
|
margin-top: -4px;
|
|
|
|
margin-bottom: calc(@typography-title-margin-bottom - 4px);
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
}
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// list
|
|
|
|
ul,
|
|
|
|
ol {
|
2021-10-22 13:35:36 +08:00
|
|
|
margin: 0 0 1em;
|
2019-02-19 11:42:05 +08:00
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
li {
|
|
|
|
margin: 0 0 0 20px;
|
|
|
|
padding: 0 0 0 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-17 11:30:16 +08:00
|
|
|
ul {
|
2019-02-19 11:42:05 +08:00
|
|
|
list-style-type: circle;
|
|
|
|
|
2020-03-17 11:30:16 +08:00
|
|
|
ul {
|
2019-02-19 11:42:05 +08:00
|
|
|
list-style-type: disc;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-17 11:30:16 +08:00
|
|
|
ol {
|
2019-02-19 11:42:05 +08:00
|
|
|
list-style-type: decimal;
|
|
|
|
}
|
|
|
|
|
2020-10-14 19:56:31 +08:00
|
|
|
// pre & block
|
|
|
|
pre,
|
|
|
|
blockquote {
|
|
|
|
margin: 1em 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
pre {
|
|
|
|
padding: 0.4em 0.6em;
|
|
|
|
white-space: pre-wrap;
|
|
|
|
word-wrap: break-word;
|
|
|
|
background: rgba(150, 150, 150, 0.1);
|
|
|
|
border: 1px solid rgba(100, 100, 100, 0.2);
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
|
|
// Compatible for marked
|
|
|
|
code {
|
|
|
|
display: inline;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
font-size: inherit;
|
|
|
|
font-family: inherit;
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
blockquote {
|
|
|
|
padding: 0 0 0 0.6em;
|
|
|
|
border-left: 4px solid rgba(100, 100, 100, 0.2);
|
|
|
|
opacity: 0.85;
|
|
|
|
}
|
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
// ============ Ellipsis ============
|
2021-05-19 13:17:58 +08:00
|
|
|
&-single-line {
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
&-ellipsis-single-line {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2020-04-01 23:31:22 +08:00
|
|
|
|
|
|
|
// https://blog.csdn.net/iefreer/article/details/50421025
|
2020-05-11 14:28:57 +08:00
|
|
|
a&,
|
2020-04-01 23:31:22 +08:00
|
|
|
span& {
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
2019-02-19 11:42:05 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-ellipsis-multiple-line {
|
2021-10-22 13:35:36 +08:00
|
|
|
/* stylelint-disable-next-line value-no-vendor-prefix */
|
2019-02-19 11:42:05 +08:00
|
|
|
display: -webkit-box;
|
2021-01-30 19:39:02 +08:00
|
|
|
overflow: hidden;
|
2019-02-19 11:42:05 +08:00
|
|
|
-webkit-line-clamp: 3;
|
2021-10-22 13:35:36 +08:00
|
|
|
|
2019-02-19 11:42:05 +08:00
|
|
|
/*! autoprefixer: ignore next */
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
}
|
|
|
|
}
|
2020-03-19 12:13:24 +08:00
|
|
|
|
|
|
|
@import './rtl';
|