Skip to content

Commit 394f247

Browse files
committed
Avoid unnecessary system-ui expansion (fix #12325)
1 parent 61a1729 commit 394f247

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

web_src/less/_base.less

+6-5
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@
1818
url('../fonts/noto-color-emoji/NotoColorEmoji.ttf') format('truetype');
1919
}
2020

21-
@default-fonts: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" sans-serif;
21+
@default-fonts: -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, Helvetica, Arial;
22+
@emoji-fonts: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
2223
@monospaced-fonts: 'SF Mono', Consolas, Menlo, 'Liberation Mono', Monaco, 'Lucida Console';
2324

2425
.override-fonts(@fonts) {
2526
textarea {
26-
font-family: @fonts;
27+
font-family: @fonts, sans-serif, @emoji-fonts;
2728
}
2829

2930
.markdown:not(code) {
30-
font-family: @fonts;
31+
font-family: @fonts, sans-serif, @emoji-fonts;
3132
}
3233

3334
/* We're going to just override the semantic fonts here */
@@ -36,7 +37,7 @@
3637
h3,
3738
h4,
3839
h5 {
39-
font-family: @fonts;
40+
font-family: @fonts, sans-serif, @emoji-fonts;
4041
}
4142

4243
.ui.accordion .title:not(.ui),
@@ -75,7 +76,7 @@
7576
.ui.steps .step .title,
7677
.ui.text.container,
7778
.ui.language > .menu > .item& {
78-
font-family: @fonts;
79+
font-family: @fonts, sans-serif, @emoji-fonts;
7980
}
8081
}
8182

webpack.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
44
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
55
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
66
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
7-
const PostCSSPresetEnv = require('postcss-preset-env');
7+
const PostCSSPresetEnv = () => require('postcss-preset-env')({
8+
features: {
9+
'system-ui-font-family': false,
10+
}
11+
});
812
const TerserPlugin = require('terser-webpack-plugin');
913
const VueLoaderPlugin = require('vue-loader/lib/plugin');
1014
const {statSync} = require('fs');

0 commit comments

Comments
 (0)