ant-design-vue/components/style/mixins/iconfont.less

42 lines
912 B
Plaintext
Raw Normal View History

2017-10-26 15:18:08 +08:00
.iconfont-mixin() {
display: inline-block;
font-style: normal;
2018-11-14 21:33:56 +08:00
vertical-align: -0.125em; // for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
2017-10-26 15:18:08 +08:00
text-align: center;
text-transform: none;
2018-11-14 21:33:56 +08:00
line-height: 0;
2017-10-26 15:18:08 +08:00
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
2018-11-14 21:33:56 +08:00
> * {
line-height: 1;
}
svg {
display: inline-block;
}
2017-10-26 15:18:08 +08:00
&:before {
2018-11-14 21:33:56 +08:00
display: none; // dont display old icon.
2017-10-26 15:18:08 +08:00
}
2018-11-14 21:33:56 +08:00
& &-icon {
display: block;
}
2017-10-26 15:18:08 +08:00
}
// for iconfont font size
// fix chrome 12px bug, support ie
.iconfont-size-under-12px(@size, @rotate: 0deg) {
display: inline-block;
@font-scale: unit(@size / 12px);
2018-01-15 18:54:26 +08:00
font-size: 12px;
// IE9
2018-12-09 19:30:35 +08:00
font-size: ~"@{size} \9";
2017-10-26 15:18:08 +08:00
transform: scale(@font-scale) rotate(@rotate);
:root & {
2018-01-15 18:54:26 +08:00
font-size: @font-size-sm; // reset IE9 and above
2017-10-26 15:18:08 +08:00
}
}