From 817c466c1e9dd530026df7e905090d50adf37974 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 2 Nov 2023 22:57:35 +0800 Subject: [PATCH] Ensure configured `font-feature-settings` for `mono` are included in Preflight (#12342) * Use the default font-feature-settings for mono * Update changelog * Update tests --------- Co-authored-by: Jordan Pittman --- CHANGELOG.md | 1 + src/css/preflight.css | 10 +- tests/source-maps.test.js | 440 +++++++++++++++++++------------------- 3 files changed, 229 insertions(+), 222 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 081e64db5bc7..b1150ed680ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Don’t add spaces to negative numbers following a comma ([#12324](https://github.com/tailwindlabs/tailwindcss/pull/12324)) - Don't emit `@config` in CSS when watching via the CLI ([#12327](https://github.com/tailwindlabs/tailwindcss/pull/12327)) - Improve types for `resolveConfig` ([#12272](https://github.com/tailwindlabs/tailwindcss/pull/12272)) +- Ensure configured `font-feature-settings` for `mono` are included in Preflight ([#12342](https://github.com/tailwindlabs/tailwindcss/pull/12342)) ## [3.3.5] - 2023-10-25 diff --git a/src/css/preflight.css b/src/css/preflight.css index e5e52cd8f323..8783e9b935ea 100644 --- a/src/css/preflight.css +++ b/src/css/preflight.css @@ -99,8 +99,10 @@ strong { } /* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. +1. Use the user's configured `mono` font-family by default. +2. Use the user's configured `mono` font-feature-settings by default. +3. Use the user's configured `mono` font-variation-settings by default. +4. Correct the odd `em` font sizing in all browsers. */ code, @@ -108,7 +110,9 @@ kbd, samp, pre { font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */ - font-size: 1em; /* 2 */ + font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */ + font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */ + font-size: 1em; /* 4 */ } /* diff --git a/tests/source-maps.test.js b/tests/source-maps.test.js index a19aea687bdd..5add3b0c81e3 100644 --- a/tests/source-maps.test.js +++ b/tests/source-maps.test.js @@ -144,261 +144,263 @@ crosscheck(({ stable, oxide }) => { '2:6-20 -> 100:2-21', '2:20 -> 101:0', '2:6 -> 103:0', - '2:20 -> 106:1', - '2:6 -> 108:0', - '2:6-20 -> 112:2-121', - '2:6-20 -> 113:2-24', - '2:20 -> 114:0', - '2:6 -> 116:0', - '2:20 -> 118:1', + '2:20 -> 108:1', + '2:6 -> 110:0', + '2:6-20 -> 114:2-121', + '2:6-20 -> 115:2-39', + '2:6-20 -> 116:2-41', + '2:6-20 -> 117:2-24', + '2:20 -> 118:0', '2:6 -> 120:0', - '2:6-20 -> 121:2-16', - '2:20 -> 122:0', + '2:20 -> 122:1', '2:6 -> 124:0', - '2:20 -> 126:1', + '2:6-20 -> 125:2-16', + '2:20 -> 126:0', '2:6 -> 128:0', - '2:6-20 -> 130:2-16', - '2:6-20 -> 131:2-16', - '2:6-20 -> 132:2-20', - '2:6-20 -> 133:2-26', - '2:20 -> 134:0', - '2:6 -> 136:0', - '2:6-20 -> 137:2-17', + '2:20 -> 130:1', + '2:6 -> 132:0', + '2:6-20 -> 134:2-16', + '2:6-20 -> 135:2-16', + '2:6-20 -> 136:2-20', + '2:6-20 -> 137:2-26', '2:20 -> 138:0', '2:6 -> 140:0', - '2:6-20 -> 141:2-13', + '2:6-20 -> 141:2-17', '2:20 -> 142:0', '2:6 -> 144:0', - '2:20 -> 148:1', - '2:6 -> 150:0', - '2:6-20 -> 151:2-24', - '2:6-20 -> 152:2-31', - '2:6-20 -> 153:2-35', - '2:20 -> 154:0', - '2:6 -> 156:0', - '2:20 -> 160:1', - '2:6 -> 162:0', - '2:6-20 -> 167:2-30', - '2:6-20 -> 168:2-40', - '2:6-20 -> 169:2-42', - '2:6-20 -> 170:2-25', + '2:6-20 -> 145:2-13', + '2:20 -> 146:0', + '2:6 -> 148:0', + '2:20 -> 152:1', + '2:6 -> 154:0', + '2:6-20 -> 155:2-24', + '2:6-20 -> 156:2-31', + '2:6-20 -> 157:2-35', + '2:20 -> 158:0', + '2:6 -> 160:0', + '2:20 -> 164:1', + '2:6 -> 166:0', '2:6-20 -> 171:2-30', - '2:6-20 -> 172:2-30', - '2:6-20 -> 173:2-24', - '2:6-20 -> 174:2-19', - '2:6-20 -> 175:2-20', - '2:20 -> 176:0', - '2:6 -> 178:0', - '2:20 -> 180:1', + '2:6-20 -> 172:2-40', + '2:6-20 -> 173:2-42', + '2:6-20 -> 174:2-25', + '2:6-20 -> 175:2-30', + '2:6-20 -> 176:2-30', + '2:6-20 -> 177:2-24', + '2:6-20 -> 178:2-19', + '2:6-20 -> 179:2-20', + '2:20 -> 180:0', '2:6 -> 182:0', - '2:6-20 -> 184:2-22', - '2:20 -> 185:0', - '2:6 -> 187:0', - '2:20 -> 190:1', - '2:6 -> 192:0', - '2:6-20 -> 196:2-36', - '2:6-20 -> 197:2-39', - '2:6-20 -> 198:2-32', - '2:20 -> 199:0', - '2:6 -> 201:0', - '2:20 -> 203:1', + '2:20 -> 184:1', + '2:6 -> 186:0', + '2:6-20 -> 188:2-22', + '2:20 -> 189:0', + '2:6 -> 191:0', + '2:20 -> 194:1', + '2:6 -> 196:0', + '2:6-20 -> 200:2-36', + '2:6-20 -> 201:2-39', + '2:6-20 -> 202:2-32', + '2:20 -> 203:0', '2:6 -> 205:0', - '2:6-20 -> 206:2-15', - '2:20 -> 207:0', + '2:20 -> 207:1', '2:6 -> 209:0', - '2:20 -> 211:1', + '2:6-20 -> 210:2-15', + '2:20 -> 211:0', '2:6 -> 213:0', - '2:6-20 -> 214:2-18', - '2:20 -> 215:0', + '2:20 -> 215:1', '2:6 -> 217:0', - '2:20 -> 219:1', + '2:6-20 -> 218:2-18', + '2:20 -> 219:0', '2:6 -> 221:0', - '2:6-20 -> 222:2-26', - '2:20 -> 223:0', + '2:20 -> 223:1', '2:6 -> 225:0', - '2:20 -> 227:1', + '2:6-20 -> 226:2-26', + '2:20 -> 227:0', '2:6 -> 229:0', - '2:6-20 -> 231:2-14', - '2:20 -> 232:0', - '2:6 -> 234:0', - '2:20 -> 237:1', - '2:6 -> 239:0', - '2:6-20 -> 240:2-39', - '2:6-20 -> 241:2-30', - '2:20 -> 242:0', - '2:6 -> 244:0', - '2:20 -> 246:1', + '2:20 -> 231:1', + '2:6 -> 233:0', + '2:6-20 -> 235:2-14', + '2:20 -> 236:0', + '2:6 -> 238:0', + '2:20 -> 241:1', + '2:6 -> 243:0', + '2:6-20 -> 244:2-39', + '2:6-20 -> 245:2-30', + '2:20 -> 246:0', '2:6 -> 248:0', - '2:6-20 -> 249:2-26', - '2:20 -> 250:0', + '2:20 -> 250:1', '2:6 -> 252:0', - '2:20 -> 255:1', - '2:6 -> 257:0', - '2:6-20 -> 258:2-36', - '2:6-20 -> 259:2-23', - '2:20 -> 260:0', - '2:6 -> 262:0', - '2:20 -> 264:1', + '2:6-20 -> 253:2-26', + '2:20 -> 254:0', + '2:6 -> 256:0', + '2:20 -> 259:1', + '2:6 -> 261:0', + '2:6-20 -> 262:2-36', + '2:6-20 -> 263:2-23', + '2:20 -> 264:0', '2:6 -> 266:0', - '2:6-20 -> 267:2-20', - '2:20 -> 268:0', + '2:20 -> 268:1', '2:6 -> 270:0', - '2:20 -> 272:1', + '2:6-20 -> 271:2-20', + '2:20 -> 272:0', '2:6 -> 274:0', - '2:6-20 -> 287:2-11', - '2:20 -> 288:0', - '2:6 -> 290:0', + '2:20 -> 276:1', + '2:6 -> 278:0', '2:6-20 -> 291:2-11', - '2:6-20 -> 292:2-12', - '2:20 -> 293:0', - '2:6 -> 295:0', + '2:20 -> 292:0', + '2:6 -> 294:0', + '2:6-20 -> 295:2-11', '2:6-20 -> 296:2-12', '2:20 -> 297:0', '2:6 -> 299:0', - '2:6-20 -> 302:2-18', - '2:6-20 -> 303:2-11', - '2:6-20 -> 304:2-12', - '2:20 -> 305:0', - '2:6 -> 307:0', - '2:20 -> 309:1', - '2:6 -> 310:0', - '2:6-20 -> 311:2-12', - '2:20 -> 312:0', + '2:6-20 -> 300:2-12', + '2:20 -> 301:0', + '2:6 -> 303:0', + '2:6-20 -> 306:2-18', + '2:6-20 -> 307:2-11', + '2:6-20 -> 308:2-12', + '2:20 -> 309:0', + '2:6 -> 311:0', + '2:20 -> 313:1', '2:6 -> 314:0', - '2:20 -> 316:1', + '2:6-20 -> 315:2-12', + '2:20 -> 316:0', '2:6 -> 318:0', - '2:6-20 -> 319:2-18', - '2:20 -> 320:0', + '2:20 -> 320:1', '2:6 -> 322:0', - '2:20 -> 325:1', - '2:6 -> 327:0', - '2:6-20 -> 329:2-20', - '2:6-20 -> 330:2-24', - '2:20 -> 331:0', - '2:6 -> 333:0', - '2:20 -> 335:1', + '2:6-20 -> 323:2-18', + '2:20 -> 324:0', + '2:6 -> 326:0', + '2:20 -> 329:1', + '2:6 -> 331:0', + '2:6-20 -> 333:2-20', + '2:6-20 -> 334:2-24', + '2:20 -> 335:0', '2:6 -> 337:0', - '2:6-20 -> 339:2-17', - '2:20 -> 340:0', - '2:6 -> 342:0', - '2:20 -> 344:1', - '2:6 -> 345:0', - '2:6-20 -> 346:2-17', - '2:20 -> 347:0', + '2:20 -> 339:1', + '2:6 -> 341:0', + '2:6-20 -> 343:2-17', + '2:20 -> 344:0', + '2:6 -> 346:0', + '2:20 -> 348:1', '2:6 -> 349:0', - '2:20 -> 353:1', - '2:6 -> 355:0', - '2:6-20 -> 363:2-24', - '2:6-20 -> 364:2-32', - '2:20 -> 365:0', - '2:6 -> 367:0', - '2:20 -> 369:1', + '2:6-20 -> 350:2-17', + '2:20 -> 351:0', + '2:6 -> 353:0', + '2:20 -> 357:1', + '2:6 -> 359:0', + '2:6-20 -> 367:2-24', + '2:6-20 -> 368:2-32', + '2:20 -> 369:0', '2:6 -> 371:0', - '2:6-20 -> 373:2-17', - '2:6-20 -> 374:2-14', - '2:20 -> 375:0', - '2:6-20 -> 377:0-72', - '2:6 -> 378:0', - '2:6-20 -> 379:2-15', - '2:20 -> 380:0', + '2:20 -> 373:1', + '2:6 -> 375:0', + '2:6-20 -> 377:2-17', + '2:6-20 -> 378:2-14', + '2:20 -> 379:0', + '2:6-20 -> 381:0-72', '2:6 -> 382:0', - '2:6-20 -> 383:2-26', - '2:6-20 -> 384:2-26', - '2:6-20 -> 385:2-21', - '2:6-20 -> 386:2-21', - '2:6-20 -> 387:2-16', - '2:6-20 -> 388:2-16', - '2:6-20 -> 389:2-16', - '2:6-20 -> 390:2-17', - '2:6-20 -> 391:2-17', - '2:6-20 -> 392:2-15', - '2:6-20 -> 393:2-15', - '2:6-20 -> 394:2-20', - '2:6-20 -> 395:2-40', - '2:6-20 -> 396:2-32', - '2:6-20 -> 397:2-31', - '2:6-20 -> 398:2-30', - '2:6-20 -> 399:2-17', - '2:6-20 -> 400:2-22', - '2:6-20 -> 401:2-24', - '2:6-20 -> 402:2-25', - '2:6-20 -> 403:2-26', - '2:6-20 -> 404:2-20', - '2:6-20 -> 405:2-29', - '2:6-20 -> 406:2-30', - '2:6-20 -> 407:2-40', - '2:6-20 -> 408:2-36', + '2:6-20 -> 383:2-15', + '2:20 -> 384:0', + '2:6 -> 386:0', + '2:6-20 -> 387:2-26', + '2:6-20 -> 388:2-26', + '2:6-20 -> 389:2-21', + '2:6-20 -> 390:2-21', + '2:6-20 -> 391:2-16', + '2:6-20 -> 392:2-16', + '2:6-20 -> 393:2-16', + '2:6-20 -> 394:2-17', + '2:6-20 -> 395:2-17', + '2:6-20 -> 396:2-15', + '2:6-20 -> 397:2-15', + '2:6-20 -> 398:2-20', + '2:6-20 -> 399:2-40', + '2:6-20 -> 400:2-32', + '2:6-20 -> 401:2-31', + '2:6-20 -> 402:2-30', + '2:6-20 -> 403:2-17', + '2:6-20 -> 404:2-22', + '2:6-20 -> 405:2-24', + '2:6-20 -> 406:2-25', + '2:6-20 -> 407:2-26', + '2:6-20 -> 408:2-20', '2:6-20 -> 409:2-29', - '2:6-20 -> 410:2-24', - '2:6-20 -> 411:2-32', - '2:6-20 -> 412:2-14', - '2:6-20 -> 413:2-20', - '2:6-20 -> 414:2-18', - '2:6-20 -> 415:2-19', - '2:6-20 -> 416:2-20', - '2:6-20 -> 417:2-16', + '2:6-20 -> 410:2-30', + '2:6-20 -> 411:2-40', + '2:6-20 -> 412:2-36', + '2:6-20 -> 413:2-29', + '2:6-20 -> 414:2-24', + '2:6-20 -> 415:2-32', + '2:6-20 -> 416:2-14', + '2:6-20 -> 417:2-20', '2:6-20 -> 418:2-18', - '2:6-20 -> 419:2-15', - '2:6-20 -> 420:2-21', - '2:6-20 -> 421:2-23', - '2:6-20 -> 422:2-29', - '2:6-20 -> 423:2-27', - '2:6-20 -> 424:2-28', - '2:6-20 -> 425:2-29', - '2:6-20 -> 426:2-25', - '2:6-20 -> 427:2-26', - '2:6-20 -> 428:2-27', - '2:6 -> 429:2', - '2:20 -> 430:0', - '2:6 -> 432:0', - '2:6-20 -> 433:2-26', - '2:6-20 -> 434:2-26', - '2:6-20 -> 435:2-21', - '2:6-20 -> 436:2-21', - '2:6-20 -> 437:2-16', - '2:6-20 -> 438:2-16', - '2:6-20 -> 439:2-16', - '2:6-20 -> 440:2-17', - '2:6-20 -> 441:2-17', - '2:6-20 -> 442:2-15', - '2:6-20 -> 443:2-15', - '2:6-20 -> 444:2-20', - '2:6-20 -> 445:2-40', - '2:6-20 -> 446:2-32', - '2:6-20 -> 447:2-31', - '2:6-20 -> 448:2-30', - '2:6-20 -> 449:2-17', - '2:6-20 -> 450:2-22', - '2:6-20 -> 451:2-24', - '2:6-20 -> 452:2-25', - '2:6-20 -> 453:2-26', - '2:6-20 -> 454:2-20', - '2:6-20 -> 455:2-29', - '2:6-20 -> 456:2-30', - '2:6-20 -> 457:2-40', - '2:6-20 -> 458:2-36', + '2:6-20 -> 419:2-19', + '2:6-20 -> 420:2-20', + '2:6-20 -> 421:2-16', + '2:6-20 -> 422:2-18', + '2:6-20 -> 423:2-15', + '2:6-20 -> 424:2-21', + '2:6-20 -> 425:2-23', + '2:6-20 -> 426:2-29', + '2:6-20 -> 427:2-27', + '2:6-20 -> 428:2-28', + '2:6-20 -> 429:2-29', + '2:6-20 -> 430:2-25', + '2:6-20 -> 431:2-26', + '2:6-20 -> 432:2-27', + '2:6 -> 433:2', + '2:20 -> 434:0', + '2:6 -> 436:0', + '2:6-20 -> 437:2-26', + '2:6-20 -> 438:2-26', + '2:6-20 -> 439:2-21', + '2:6-20 -> 440:2-21', + '2:6-20 -> 441:2-16', + '2:6-20 -> 442:2-16', + '2:6-20 -> 443:2-16', + '2:6-20 -> 444:2-17', + '2:6-20 -> 445:2-17', + '2:6-20 -> 446:2-15', + '2:6-20 -> 447:2-15', + '2:6-20 -> 448:2-20', + '2:6-20 -> 449:2-40', + '2:6-20 -> 450:2-32', + '2:6-20 -> 451:2-31', + '2:6-20 -> 452:2-30', + '2:6-20 -> 453:2-17', + '2:6-20 -> 454:2-22', + '2:6-20 -> 455:2-24', + '2:6-20 -> 456:2-25', + '2:6-20 -> 457:2-26', + '2:6-20 -> 458:2-20', '2:6-20 -> 459:2-29', - '2:6-20 -> 460:2-24', - '2:6-20 -> 461:2-32', - '2:6-20 -> 462:2-14', - '2:6-20 -> 463:2-20', - '2:6-20 -> 464:2-18', - '2:6-20 -> 465:2-19', - '2:6-20 -> 466:2-20', - '2:6-20 -> 467:2-16', + '2:6-20 -> 460:2-30', + '2:6-20 -> 461:2-40', + '2:6-20 -> 462:2-36', + '2:6-20 -> 463:2-29', + '2:6-20 -> 464:2-24', + '2:6-20 -> 465:2-32', + '2:6-20 -> 466:2-14', + '2:6-20 -> 467:2-20', '2:6-20 -> 468:2-18', - '2:6-20 -> 469:2-15', - '2:6-20 -> 470:2-21', - '2:6-20 -> 471:2-23', - '2:6-20 -> 472:2-29', - '2:6-20 -> 473:2-27', - '2:6-20 -> 474:2-28', - '2:6-20 -> 475:2-29', - '2:6-20 -> 476:2-25', - '2:6-20 -> 477:2-26', - '2:6-20 -> 478:2-27', - '2:6 -> 479:2', - '2:20 -> 480:0', + '2:6-20 -> 469:2-19', + '2:6-20 -> 470:2-20', + '2:6-20 -> 471:2-16', + '2:6-20 -> 472:2-18', + '2:6-20 -> 473:2-15', + '2:6-20 -> 474:2-21', + '2:6-20 -> 475:2-23', + '2:6-20 -> 476:2-29', + '2:6-20 -> 477:2-27', + '2:6-20 -> 478:2-28', + '2:6-20 -> 479:2-29', + '2:6-20 -> 480:2-25', + '2:6-20 -> 481:2-26', + '2:6-20 -> 482:2-27', + '2:6 -> 483:2', + '2:20 -> 484:0', ]) })