Ensure configured font-feature-settings are included in Preflight (#9707)

* Add `font-feature-settings` to `html` in preflight

* Update source map test snapshots

* Update changelog
This commit is contained in:
Brad Cornes 2022-11-01 17:52:59 +00:00 committed by GitHub
parent e231ea6c61
commit 7ec9dc311b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 314 additions and 283 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Don't reuse container for array returning variant functions ([#9644](https://github.com/tailwindlabs/tailwindcss/pull/9644))
- Exclude non-relevant selectors when generating rules with the important modifier ([#9677](https://github.com/tailwindlabs/tailwindcss/issues/9677))
- Fix merging of arrays during config resolution ([#9706](https://github.com/tailwindlabs/tailwindcss/issues/9706))
- Ensure configured `font-feature-settings` are included in Preflight ([#9707](https://github.com/tailwindlabs/tailwindcss/pull/9707))
## [3.2.1] - 2022-10-21

View File

@ -22,6 +22,7 @@
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
*/
html {
@ -30,6 +31,7 @@ html {
-moz-tab-size: 4; /* 3 */
tab-size: 4; /* 3 */
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
}
/*

View File

@ -73,292 +73,293 @@ Array [
"2:4-18 -> 19:2-18",
"2:18 -> 20:0",
"2:4 -> 22:0",
"2:18 -> 27:1",
"2:4 -> 29:0",
"2:4-18 -> 30:2-26",
"2:4-18 -> 31:2-40",
"2:4-18 -> 32:2-26",
"2:4-18 -> 33:2-21",
"2:4-18 -> 34:2-230",
"2:18 -> 35:0",
"2:4 -> 37:0",
"2:18 -> 40:1",
"2:4 -> 42:0",
"2:4-18 -> 43:2-19",
"2:4-18 -> 44:2-30",
"2:18 -> 45:0",
"2:4 -> 47:0",
"2:18 -> 51:1",
"2:4 -> 53:0",
"2:4-18 -> 54:2-19",
"2:4-18 -> 55:2-24",
"2:4-18 -> 56:2-31",
"2:18 -> 57:0",
"2:4 -> 59:0",
"2:18 -> 61:1",
"2:4 -> 63:0",
"2:4-18 -> 64:2-35",
"2:18 -> 65:0",
"2:4 -> 67:0",
"2:18 -> 69:1",
"2:4 -> 71:0",
"2:4-18 -> 77:2-20",
"2:4-18 -> 78:2-22",
"2:18 -> 79:0",
"2:4 -> 81:0",
"2:18 -> 83:1",
"2:4 -> 85:0",
"2:4-18 -> 86:2-16",
"2:4-18 -> 87:2-26",
"2:18 -> 88:0",
"2:4 -> 90:0",
"2:18 -> 92:1",
"2:4 -> 94:0",
"2:4-18 -> 96:2-21",
"2:18 -> 97:0",
"2:4 -> 99:0",
"2:18 -> 102:1",
"2:4 -> 104:0",
"2:4-18 -> 108:2-121",
"2:4-18 -> 109:2-24",
"2:18 -> 110:0",
"2:4 -> 112:0",
"2:18 -> 114:1",
"2:4 -> 116:0",
"2:4-18 -> 117:2-16",
"2:18 -> 118:0",
"2:4 -> 120:0",
"2:18 -> 122:1",
"2:4 -> 124:0",
"2:4-18 -> 126:2-16",
"2:4-18 -> 127:2-16",
"2:4-18 -> 128:2-20",
"2:4-18 -> 129:2-26",
"2:18 -> 130:0",
"2:4 -> 132:0",
"2:4-18 -> 133:2-17",
"2:18 -> 134:0",
"2:4 -> 136:0",
"2:4-18 -> 137:2-13",
"2:18 -> 138:0",
"2:4 -> 140:0",
"2:18 -> 144:1",
"2:4 -> 146:0",
"2:4-18 -> 147:2-24",
"2:4-18 -> 148:2-31",
"2:4-18 -> 149:2-35",
"2:18 -> 150:0",
"2:4 -> 152:0",
"2:18 -> 156:1",
"2:4 -> 158:0",
"2:4-18 -> 163:2-30",
"2:4-18 -> 164:2-25",
"2:18 -> 28:1",
"2:4 -> 30:0",
"2:4-18 -> 31:2-26",
"2:4-18 -> 32:2-40",
"2:4-18 -> 33:2-26",
"2:4-18 -> 34:2-21",
"2:4-18 -> 35:2-230",
"2:4-18 -> 36:2-39",
"2:18 -> 37:0",
"2:4 -> 39:0",
"2:18 -> 42:1",
"2:4 -> 44:0",
"2:4-18 -> 45:2-19",
"2:4-18 -> 46:2-30",
"2:18 -> 47:0",
"2:4 -> 49:0",
"2:18 -> 53:1",
"2:4 -> 55:0",
"2:4-18 -> 56:2-19",
"2:4-18 -> 57:2-24",
"2:4-18 -> 58:2-31",
"2:18 -> 59:0",
"2:4 -> 61:0",
"2:18 -> 63:1",
"2:4 -> 65:0",
"2:4-18 -> 66:2-35",
"2:18 -> 67:0",
"2:4 -> 69:0",
"2:18 -> 71:1",
"2:4 -> 73:0",
"2:4-18 -> 79:2-20",
"2:4-18 -> 80:2-22",
"2:18 -> 81:0",
"2:4 -> 83:0",
"2:18 -> 85:1",
"2:4 -> 87:0",
"2:4-18 -> 88:2-16",
"2:4-18 -> 89:2-26",
"2:18 -> 90:0",
"2:4 -> 92:0",
"2:18 -> 94:1",
"2:4 -> 96:0",
"2:4-18 -> 98:2-21",
"2:18 -> 99:0",
"2:4 -> 101:0",
"2:18 -> 104:1",
"2:4 -> 106:0",
"2:4-18 -> 110:2-121",
"2:4-18 -> 111:2-24",
"2:18 -> 112:0",
"2:4 -> 114:0",
"2:18 -> 116:1",
"2:4 -> 118:0",
"2:4-18 -> 119:2-16",
"2:18 -> 120:0",
"2:4 -> 122:0",
"2:18 -> 124:1",
"2:4 -> 126:0",
"2:4-18 -> 128:2-16",
"2:4-18 -> 129:2-16",
"2:4-18 -> 130:2-20",
"2:4-18 -> 131:2-26",
"2:18 -> 132:0",
"2:4 -> 134:0",
"2:4-18 -> 135:2-17",
"2:18 -> 136:0",
"2:4 -> 138:0",
"2:4-18 -> 139:2-13",
"2:18 -> 140:0",
"2:4 -> 142:0",
"2:18 -> 146:1",
"2:4 -> 148:0",
"2:4-18 -> 149:2-24",
"2:4-18 -> 150:2-31",
"2:4-18 -> 151:2-35",
"2:18 -> 152:0",
"2:4 -> 154:0",
"2:18 -> 158:1",
"2:4 -> 160:0",
"2:4-18 -> 165:2-30",
"2:4-18 -> 166:2-30",
"2:4-18 -> 167:2-24",
"2:4-18 -> 168:2-19",
"2:4-18 -> 169:2-20",
"2:18 -> 170:0",
"2:4 -> 172:0",
"2:18 -> 174:1",
"2:4 -> 176:0",
"2:4-18 -> 178:2-22",
"2:18 -> 179:0",
"2:4 -> 181:0",
"2:18 -> 184:1",
"2:4 -> 186:0",
"2:4-18 -> 190:2-36",
"2:4-18 -> 191:2-39",
"2:4-18 -> 192:2-32",
"2:18 -> 193:0",
"2:4 -> 195:0",
"2:18 -> 197:1",
"2:4 -> 199:0",
"2:4-18 -> 200:2-15",
"2:18 -> 201:0",
"2:4 -> 203:0",
"2:18 -> 205:1",
"2:4 -> 207:0",
"2:4-18 -> 208:2-18",
"2:18 -> 209:0",
"2:4 -> 211:0",
"2:18 -> 213:1",
"2:4 -> 215:0",
"2:4-18 -> 216:2-26",
"2:18 -> 217:0",
"2:4 -> 219:0",
"2:18 -> 221:1",
"2:4 -> 223:0",
"2:4-18 -> 225:2-14",
"2:18 -> 226:0",
"2:4 -> 228:0",
"2:18 -> 231:1",
"2:4 -> 233:0",
"2:4-18 -> 234:2-39",
"2:4-18 -> 235:2-30",
"2:18 -> 236:0",
"2:4 -> 238:0",
"2:18 -> 240:1",
"2:4 -> 242:0",
"2:4-18 -> 243:2-26",
"2:18 -> 244:0",
"2:4 -> 246:0",
"2:18 -> 249:1",
"2:4 -> 251:0",
"2:4-18 -> 252:2-36",
"2:4-18 -> 253:2-23",
"2:18 -> 254:0",
"2:4 -> 256:0",
"2:18 -> 258:1",
"2:4 -> 260:0",
"2:4-18 -> 261:2-20",
"2:18 -> 262:0",
"2:4 -> 264:0",
"2:18 -> 266:1",
"2:4 -> 268:0",
"2:4-18 -> 281:2-11",
"2:18 -> 282:0",
"2:4 -> 284:0",
"2:4-18 -> 285:2-11",
"2:4-18 -> 286:2-12",
"2:18 -> 287:0",
"2:4 -> 289:0",
"2:4-18 -> 290:2-12",
"2:18 -> 291:0",
"2:4 -> 293:0",
"2:4-18 -> 296:2-18",
"2:4-18 -> 297:2-11",
"2:4-18 -> 298:2-12",
"2:18 -> 299:0",
"2:4 -> 301:0",
"2:18 -> 303:1",
"2:4 -> 305:0",
"2:4-18 -> 306:2-18",
"2:18 -> 307:0",
"2:4 -> 309:0",
"2:18 -> 312:1",
"2:4 -> 314:0",
"2:4-18 -> 316:2-20",
"2:4-18 -> 317:2-24",
"2:18 -> 318:0",
"2:4 -> 320:0",
"2:18 -> 322:1",
"2:4 -> 324:0",
"2:4-18 -> 326:2-17",
"2:18 -> 327:0",
"2:4 -> 329:0",
"2:18 -> 331:1",
"2:4 -> 332:0",
"2:4-18 -> 333:2-17",
"2:18 -> 334:0",
"2:4 -> 336:0",
"2:18 -> 340:1",
"2:4 -> 342:0",
"2:4-18 -> 350:2-24",
"2:4-18 -> 351:2-32",
"2:18 -> 352:0",
"2:4 -> 354:0",
"2:18 -> 356:1",
"2:4 -> 358:0",
"2:4-18 -> 360:2-17",
"2:4-18 -> 361:2-14",
"2:18 -> 362:0",
"2:4-18 -> 364:0-72",
"2:4 -> 365:0",
"2:4-18 -> 366:2-15",
"2:18 -> 367:0",
"2:4 -> 369:0",
"2:4-18 -> 370:2-26",
"2:4-18 -> 371:2-26",
"2:4-18 -> 372:2-21",
"2:4-18 -> 373:2-21",
"2:4-18 -> 374:2-16",
"2:4-18 -> 375:2-16",
"2:4-18 -> 166:2-25",
"2:4-18 -> 167:2-30",
"2:4-18 -> 168:2-30",
"2:4-18 -> 169:2-24",
"2:4-18 -> 170:2-19",
"2:4-18 -> 171:2-20",
"2:18 -> 172:0",
"2:4 -> 174:0",
"2:18 -> 176:1",
"2:4 -> 178:0",
"2:4-18 -> 180:2-22",
"2:18 -> 181:0",
"2:4 -> 183:0",
"2:18 -> 186:1",
"2:4 -> 188:0",
"2:4-18 -> 192:2-36",
"2:4-18 -> 193:2-39",
"2:4-18 -> 194:2-32",
"2:18 -> 195:0",
"2:4 -> 197:0",
"2:18 -> 199:1",
"2:4 -> 201:0",
"2:4-18 -> 202:2-15",
"2:18 -> 203:0",
"2:4 -> 205:0",
"2:18 -> 207:1",
"2:4 -> 209:0",
"2:4-18 -> 210:2-18",
"2:18 -> 211:0",
"2:4 -> 213:0",
"2:18 -> 215:1",
"2:4 -> 217:0",
"2:4-18 -> 218:2-26",
"2:18 -> 219:0",
"2:4 -> 221:0",
"2:18 -> 223:1",
"2:4 -> 225:0",
"2:4-18 -> 227:2-14",
"2:18 -> 228:0",
"2:4 -> 230:0",
"2:18 -> 233:1",
"2:4 -> 235:0",
"2:4-18 -> 236:2-39",
"2:4-18 -> 237:2-30",
"2:18 -> 238:0",
"2:4 -> 240:0",
"2:18 -> 242:1",
"2:4 -> 244:0",
"2:4-18 -> 245:2-26",
"2:18 -> 246:0",
"2:4 -> 248:0",
"2:18 -> 251:1",
"2:4 -> 253:0",
"2:4-18 -> 254:2-36",
"2:4-18 -> 255:2-23",
"2:18 -> 256:0",
"2:4 -> 258:0",
"2:18 -> 260:1",
"2:4 -> 262:0",
"2:4-18 -> 263:2-20",
"2:18 -> 264:0",
"2:4 -> 266:0",
"2:18 -> 268:1",
"2:4 -> 270:0",
"2:4-18 -> 283:2-11",
"2:18 -> 284:0",
"2:4 -> 286:0",
"2:4-18 -> 287:2-11",
"2:4-18 -> 288:2-12",
"2:18 -> 289:0",
"2:4 -> 291:0",
"2:4-18 -> 292:2-12",
"2:18 -> 293:0",
"2:4 -> 295:0",
"2:4-18 -> 298:2-18",
"2:4-18 -> 299:2-11",
"2:4-18 -> 300:2-12",
"2:18 -> 301:0",
"2:4 -> 303:0",
"2:18 -> 305:1",
"2:4 -> 307:0",
"2:4-18 -> 308:2-18",
"2:18 -> 309:0",
"2:4 -> 311:0",
"2:18 -> 314:1",
"2:4 -> 316:0",
"2:4-18 -> 318:2-20",
"2:4-18 -> 319:2-24",
"2:18 -> 320:0",
"2:4 -> 322:0",
"2:18 -> 324:1",
"2:4 -> 326:0",
"2:4-18 -> 328:2-17",
"2:18 -> 329:0",
"2:4 -> 331:0",
"2:18 -> 333:1",
"2:4 -> 334:0",
"2:4-18 -> 335:2-17",
"2:18 -> 336:0",
"2:4 -> 338:0",
"2:18 -> 342:1",
"2:4 -> 344:0",
"2:4-18 -> 352:2-24",
"2:4-18 -> 353:2-32",
"2:18 -> 354:0",
"2:4 -> 356:0",
"2:18 -> 358:1",
"2:4 -> 360:0",
"2:4-18 -> 362:2-17",
"2:4-18 -> 363:2-14",
"2:18 -> 364:0",
"2:4-18 -> 366:0-72",
"2:4 -> 367:0",
"2:4-18 -> 368:2-15",
"2:18 -> 369:0",
"2:4 -> 371:0",
"2:4-18 -> 372:2-26",
"2:4-18 -> 373:2-26",
"2:4-18 -> 374:2-21",
"2:4-18 -> 375:2-21",
"2:4-18 -> 376:2-16",
"2:4-18 -> 377:2-17",
"2:4-18 -> 378:2-17",
"2:4-18 -> 379:2-15",
"2:4-18 -> 380:2-15",
"2:4-18 -> 381:2-20",
"2:4-18 -> 382:2-40",
"2:4-18 -> 383:2-17",
"2:4-18 -> 384:2-22",
"2:4-18 -> 385:2-24",
"2:4-18 -> 386:2-25",
"2:4-18 -> 387:2-26",
"2:4-18 -> 388:2-20",
"2:4-18 -> 389:2-29",
"2:4-18 -> 390:2-30",
"2:4-18 -> 391:2-40",
"2:4-18 -> 392:2-36",
"2:4-18 -> 393:2-29",
"2:4-18 -> 394:2-24",
"2:4-18 -> 395:2-32",
"2:4-18 -> 396:2-14",
"2:4-18 -> 397:2-20",
"2:4-18 -> 398:2-18",
"2:4-18 -> 399:2-19",
"2:4-18 -> 400:2-20",
"2:4-18 -> 401:2-16",
"2:4-18 -> 402:2-18",
"2:4-18 -> 403:2-15",
"2:4-18 -> 404:2-21",
"2:4-18 -> 405:2-23",
"2:4-18 -> 406:2-29",
"2:4-18 -> 407:2-27",
"2:4-18 -> 408:2-28",
"2:4-18 -> 409:2-29",
"2:4-18 -> 410:2-25",
"2:4-18 -> 411:2-26",
"2:4-18 -> 412:2-27",
"2:4 -> 413:2",
"2:18 -> 414:0",
"2:4 -> 416:0",
"2:4-18 -> 417:2-26",
"2:4-18 -> 418:2-26",
"2:4-18 -> 419:2-21",
"2:4-18 -> 420:2-21",
"2:4-18 -> 421:2-16",
"2:4-18 -> 422:2-16",
"2:4-18 -> 377:2-16",
"2:4-18 -> 378:2-16",
"2:4-18 -> 379:2-17",
"2:4-18 -> 380:2-17",
"2:4-18 -> 381:2-15",
"2:4-18 -> 382:2-15",
"2:4-18 -> 383:2-20",
"2:4-18 -> 384:2-40",
"2:4-18 -> 385:2-17",
"2:4-18 -> 386:2-22",
"2:4-18 -> 387:2-24",
"2:4-18 -> 388:2-25",
"2:4-18 -> 389:2-26",
"2:4-18 -> 390:2-20",
"2:4-18 -> 391:2-29",
"2:4-18 -> 392:2-30",
"2:4-18 -> 393:2-40",
"2:4-18 -> 394:2-36",
"2:4-18 -> 395:2-29",
"2:4-18 -> 396:2-24",
"2:4-18 -> 397:2-32",
"2:4-18 -> 398:2-14",
"2:4-18 -> 399:2-20",
"2:4-18 -> 400:2-18",
"2:4-18 -> 401:2-19",
"2:4-18 -> 402:2-20",
"2:4-18 -> 403:2-16",
"2:4-18 -> 404:2-18",
"2:4-18 -> 405:2-15",
"2:4-18 -> 406:2-21",
"2:4-18 -> 407:2-23",
"2:4-18 -> 408:2-29",
"2:4-18 -> 409:2-27",
"2:4-18 -> 410:2-28",
"2:4-18 -> 411:2-29",
"2:4-18 -> 412:2-25",
"2:4-18 -> 413:2-26",
"2:4-18 -> 414:2-27",
"2:4 -> 415:2",
"2:18 -> 416:0",
"2:4 -> 418:0",
"2:4-18 -> 419:2-26",
"2:4-18 -> 420:2-26",
"2:4-18 -> 421:2-21",
"2:4-18 -> 422:2-21",
"2:4-18 -> 423:2-16",
"2:4-18 -> 424:2-17",
"2:4-18 -> 425:2-17",
"2:4-18 -> 426:2-15",
"2:4-18 -> 427:2-15",
"2:4-18 -> 428:2-20",
"2:4-18 -> 429:2-40",
"2:4-18 -> 430:2-17",
"2:4-18 -> 431:2-22",
"2:4-18 -> 432:2-24",
"2:4-18 -> 433:2-25",
"2:4-18 -> 434:2-26",
"2:4-18 -> 435:2-20",
"2:4-18 -> 436:2-29",
"2:4-18 -> 437:2-30",
"2:4-18 -> 438:2-40",
"2:4-18 -> 439:2-36",
"2:4-18 -> 440:2-29",
"2:4-18 -> 441:2-24",
"2:4-18 -> 442:2-32",
"2:4-18 -> 443:2-14",
"2:4-18 -> 444:2-20",
"2:4-18 -> 445:2-18",
"2:4-18 -> 446:2-19",
"2:4-18 -> 447:2-20",
"2:4-18 -> 448:2-16",
"2:4-18 -> 449:2-18",
"2:4-18 -> 450:2-15",
"2:4-18 -> 451:2-21",
"2:4-18 -> 452:2-23",
"2:4-18 -> 453:2-29",
"2:4-18 -> 454:2-27",
"2:4-18 -> 455:2-28",
"2:4-18 -> 456:2-29",
"2:4-18 -> 457:2-25",
"2:4-18 -> 458:2-26",
"2:4-18 -> 459:2-27",
"2:4 -> 460:2",
"2:18 -> 461:0",
"2:4-18 -> 424:2-16",
"2:4-18 -> 425:2-16",
"2:4-18 -> 426:2-17",
"2:4-18 -> 427:2-17",
"2:4-18 -> 428:2-15",
"2:4-18 -> 429:2-15",
"2:4-18 -> 430:2-20",
"2:4-18 -> 431:2-40",
"2:4-18 -> 432:2-17",
"2:4-18 -> 433:2-22",
"2:4-18 -> 434:2-24",
"2:4-18 -> 435:2-25",
"2:4-18 -> 436:2-26",
"2:4-18 -> 437:2-20",
"2:4-18 -> 438:2-29",
"2:4-18 -> 439:2-30",
"2:4-18 -> 440:2-40",
"2:4-18 -> 441:2-36",
"2:4-18 -> 442:2-29",
"2:4-18 -> 443:2-24",
"2:4-18 -> 444:2-32",
"2:4-18 -> 445:2-14",
"2:4-18 -> 446:2-20",
"2:4-18 -> 447:2-18",
"2:4-18 -> 448:2-19",
"2:4-18 -> 449:2-20",
"2:4-18 -> 450:2-16",
"2:4-18 -> 451:2-18",
"2:4-18 -> 452:2-15",
"2:4-18 -> 453:2-21",
"2:4-18 -> 454:2-23",
"2:4-18 -> 455:2-29",
"2:4-18 -> 456:2-27",
"2:4-18 -> 457:2-28",
"2:4-18 -> 458:2-29",
"2:4-18 -> 459:2-25",
"2:4-18 -> 460:2-26",
"2:4-18 -> 461:2-27",
"2:4 -> 462:2",
"2:18 -> 463:0",
]
`;

View File

@ -653,6 +653,33 @@ test('font-family values are retrieved without font-feature-settings', () => {
})
})
test('font-feature-settings values can be retrieved', () => {
let input = css`
.heading {
font-family: theme('fontFamily.sans');
font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings');
}
`
let output = css`
.heading {
font-family: Inter;
font-feature-settings: 'cv11';
}
`
return run(input, {
theme: {
fontFamily: {
sans: ['Inter', { fontFeatureSettings: "'cv11'" }],
},
},
}).then((result) => {
expect(result.css).toMatchCss(output)
expect(result.warnings().length).toBe(0)
})
})
test('box-shadow values are joined when an array', () => {
let input = css`
.element {