Skip to content

Commit 817c466

Browse files
tomblthecrypticace
andcommitted
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 <[email protected]>
1 parent ffadf2b commit 817c466

File tree

3 files changed

+229
-222
lines changed

3 files changed

+229
-222
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Don’t add spaces to negative numbers following a comma ([#12324](https://github.com/tailwindlabs/tailwindcss/pull/12324))
1313
- Don't emit `@config` in CSS when watching via the CLI ([#12327](https://github.com/tailwindlabs/tailwindcss/pull/12327))
1414
- Improve types for `resolveConfig` ([#12272](https://github.com/tailwindlabs/tailwindcss/pull/12272))
15+
- Ensure configured `font-feature-settings` for `mono` are included in Preflight ([#12342](https://github.com/tailwindlabs/tailwindcss/pull/12342))
1516

1617
## [3.3.5] - 2023-10-25
1718

src/css/preflight.css

+7-3
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,20 @@ strong {
9999
}
100100

101101
/*
102-
1. Use the user's configured `mono` font family by default.
103-
2. Correct the odd `em` font sizing in all browsers.
102+
1. Use the user's configured `mono` font-family by default.
103+
2. Use the user's configured `mono` font-feature-settings by default.
104+
3. Use the user's configured `mono` font-variation-settings by default.
105+
4. Correct the odd `em` font sizing in all browsers.
104106
*/
105107

106108
code,
107109
kbd,
108110
samp,
109111
pre {
110112
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
111-
font-size: 1em; /* 2 */
113+
font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
114+
font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
115+
font-size: 1em; /* 4 */
112116
}
113117

114118
/*

0 commit comments

Comments
 (0)