You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ant-design-vue/components/typography/style/index.less

287 lines
4.4 KiB

@import '../../style/themes/index';
@import '../../style/mixins/index';
@typography-prefix-cls: ~'@{ant-prefix}-typography';
// =============== Basic ===============
.@{typography-prefix-cls} {
color: @text-color;
overflow-wrap: break-word;
&&-secondary {
color: @text-color-secondary;
}
&&-success {
color: @success-color;
}
&&-warning {
color: @warning-color;
}
&&-danger {
color: @error-color;
a&:active,
a&:focus,
a&:hover {
color: ~`colorPalette('@{error-color}', 5) `;
}
}
&&-disabled {
color: @disabled-color;
cursor: not-allowed;
user-select: none;
}
// Tag
div&,
p {
.typography-paragraph();
}
h1&,
h1 {
.typography-title-1();
}
h2&,
h2 {
.typography-title-2();
}
h3&,
h3 {
.typography-title-3();
}
h4&,
h4 {
.typography-title-4();
}
h5&,
h5 {
.typography-title-5();
}
h1&,
h2&,
h3&,
h4&,
h5& {
.@{typography-prefix-cls} + & {
margin-top: @typography-title-margin-top;
}
}
div,
ul,
li,
p,
h1,
h2,
h3,
h4,
h5 {
+ h1,
+ h2,
+ h3,
+ h4,
+ h5 {
margin-top: @typography-title-margin-top;
}
}
a&-ellipsis,
span&-ellipsis {
display: inline-block;
}
a&,
a {
.operation-unit();
text-decoration: @link-decoration;
&:active,
&:hover {
text-decoration: @link-hover-decoration;
}
&[disabled],
&.@{typography-prefix-cls}-disabled {
color: @disabled-color;
cursor: not-allowed;
&:active,
&:hover {
color: @disabled-color;
}
&:active {
pointer-events: none;
}
}
}
code {
margin: 0 0.2em;
padding: 0.2em 0.4em 0.1em;
font-size: 85%;
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;
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();
margin-left: 4px;
}
&-copy-success {
&,
&:hover,
&:focus {
color: @success-color;
}
}
// Text input area
&-edit-content {
position: relative;
div& {
left: -@input-padding-horizontal - 1px;
margin-top: -@input-padding-vertical-base - 1px;
// stylelint-disable-next-line function-calc-no-invalid
margin-bottom: calc(1em - @input-padding-vertical-base - 1px);
}
&-confirm {
position: absolute;
right: 10px;
bottom: 8px;
color: @text-color-secondary;
pointer-events: none;
}
// Fix Editable Textarea flash in Firefox
textarea {
-moz-transition: none;
}
}
// list
ul,
ol {
margin: 0 0 1em 0;
padding: 0;
li {
margin: 0 0 0 20px;
padding: 0 0 0 4px;
}
}
ul {
list-style-type: circle;
ul {
list-style-type: disc;
}
}
ol {
list-style-type: decimal;
}
// 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;
}
// ============ Ellipsis ============
refactor: Anchor、Alert、Avatar、Badge、BackTop、Col、Form、Layout、Menu、Space、Spin、Switch、Row、Result、Rate (#4171) * chore: remove resize-observer-polyfill * refactor: align * refactor(v3/avatar): refactor using composition api (#4052) * refactor(avatar): refactor using composition api * refactor: update props define * fix: avatar src scale not update * refactor: resizeObserver * refactor: divider * refactor: localeProvider * refactor(v3/back-top): use composition api (#4060) * refactor: backtop * refactor: empty * refactor: transButton * feat(v3/avatar): add avatar group (#4062) * feat(avatar): add avatar group * refactor: update * refactor: update Co-authored-by: tangjinzhou <415800467@qq.com> * refactor: avatar * refactor: avatar * style: rename useProvide * refactor: menu (#4110) * fix: menu * refactor: menu * refactor: remove rc-menu * fix: menu rtl error * style: lint * refactor(Anchor): use composition api (#4054) * refactor: anchor * refactor: anchor * refactor: anchor * feat: update * fix: icon class lose * refactor(v3/badge): use composition api (#4076) * refactor: badge * fix: badge inheritAttrs * refactor: grid * refactor: layout * fix: menu not close * refactor: space * refactor: result * refactor: affix * refactor: comment * refactor: form * feat: spin add rtl * feat: export spin type * refactor: pageHeader * refactor: page-header * refactor: skeleton * refactor: typography * refactor(v3/rate): use composition api * fix: add useRef hook * refactor: form * fix: menu not update * refactor: form * refactor: form * fix: slide animate not work * fix: menu mode error * fix: menu icon * refactor: rate * perf: remove rate * feat: add vc-overflow * refactor: menu * fix: remove flex check (#4165) * fix: dist locale file lose #3684 * release 2.2.0-beta.1 * dcos: update changelog * chore: update type * docs: update changelog Co-authored-by: John <John60676@qq.com> Co-authored-by: 言肆 <18x@loacg.com> Co-authored-by: zkwolf <chenhao5866@gmail.com>
4 years ago
&-single-line {
white-space: nowrap;
}
&-ellipsis-single-line {
overflow: hidden;
text-overflow: ellipsis;
// https://blog.csdn.net/iefreer/article/details/50421025
a&,
span& {
vertical-align: bottom;
}
}
&-ellipsis-multiple-line {
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 3;
/*! autoprefixer: ignore next */
-webkit-box-orient: vertical;
}
}
@import './rtl';