Skip to content

Commit a373054

Browse files
committed
Improve font rendering on HiDPI devices
Fixes #19
1 parent 36e9e45 commit a373054

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

modern-base.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,25 @@
11
/*! modern-base | MIT License | https://github.com/sindresorhus/modern-normalize */
22

3+
4+
/**
5+
* Improve font rendering on HiDPI devices.
6+
*/
7+
8+
@media
9+
screen and (-webkit-min-device-pixel-ratio: 2),
10+
screen and (min-resolution: 2dppx) {
11+
body {
12+
-moz-osx-font-smoothing: grayscale;
13+
-webkit-font-smoothing: antialiased;
14+
}
15+
}
16+
317
/**
4-
* 1. Break up words and URLs so they don't break your layout.
5-
* 2. Improve font rendering in Chrome and Safari on macOS.
18+
* Break up words and URLs so they don't break your layout.
619
*/
720

821
html {
9-
word-break: break-all; /* 1 */
10-
-webkit-font-smoothing: antialiased; /* 2 */
22+
word-break: break-all;
1123
}
1224

1325
/**

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"rules": {
3838
"font-family-no-duplicate-names": null,
3939
"no-duplicate-selectors": null,
40-
"selector-no-vendor-prefix": null
40+
"selector-no-vendor-prefix": null,
41+
"media-feature-name-no-vendor-prefix": null
4142
}
4243
}
4344
}

0 commit comments

Comments
 (0)