css-preflight 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -19
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,13 +6,13 @@ other utilities are also provided.
6
6
 
7
7
  ## Differences to Tailwind's Preflight
8
8
 
9
- The following adjustments have been made to to the preflight:
9
+ The following adjustments have been made to the preflight:
10
10
 
11
11
  1. Tailwind-specific CSS variables and styling removed.
12
12
  2. Two Tailwind `font-family` defaults have been removed from the
13
13
  preflight in favor of optional imports. One was setting the
14
- default font stack for the overall html document, and the other
15
- was setting monospace fonts for html elements like `code`.
14
+ default font stack for the overall HTML document, and the other
15
+ was setting monospace fonts for HTML elements like `code`.
16
16
 
17
17
  #### Why Font Family Defaults Removed
18
18
 
@@ -52,10 +52,10 @@ import "css-preflight/preflight.css";
52
52
  import "css-preflight/mono-elements.css";
53
53
  ```
54
54
 
55
- For fastest performance, it's recommended to have the css directly
56
- injected into the html as a `<style>` tag, along with any other critical
57
- css applying to above-the-fold content. Avoid putting the `<style>` tag
58
- inside `<head>` as invalid css can break processing of other elements
55
+ For fastest performance, it's recommended to have the CSS directly
56
+ injected into the HTML as a `<style>` tag, along with any other critical
57
+ CSS applying to above-the-fold content. Avoid putting the `<style>` tag
58
+ inside `<head>` as invalid CSS can break processing of other elements
59
59
  inside `<head>`.
60
60
 
61
61
  ```html
@@ -64,7 +64,7 @@ inside `<head>`.
64
64
  <style>
65
65
  <!-- Inject here -->
66
66
  </style>
67
- <!-- rest of html -->
67
+ <!-- Rest of html -->
68
68
  </body>
69
69
  ```
70
70
 
@@ -76,9 +76,9 @@ font stacks:
76
76
  :host {
77
77
  font-family:
78
78
  /* Your fonts here */
79
+ sans-serif, /* or serif, monospace, etc. */
79
80
  /* then do: */
80
- sans-serif,
81
- /* or serif, or monospace, etc. */ "Apple Color Emoji",
81
+ "Apple Color Emoji",
82
82
  "Segoe UI Emoji",
83
83
  "Segoe UI Symbol",
84
84
  "Noto Color Emoji";
@@ -129,9 +129,9 @@ import "css-preflight/font-serif.css";
129
129
 
130
130
  ### Mono Elements
131
131
 
132
- Sets a default mono font stack for the `code`, `kbd`, `samp`, and `pre`
133
- html elements. Many design and branding systems don't include
134
- mono font guidelines so this option can be useful for those cases.
132
+ Sets a default monospace font stack for the `code`, `kbd`, `samp`, and `pre`
133
+ HTML elements. Many design and branding systems don't include
134
+ monospace font guidelines so this option can be useful for those cases.
135
135
 
136
136
  ```javascript
137
137
  import "css-preflight/mono-elements.css";
@@ -139,12 +139,10 @@ import "css-preflight/mono-elements.css";
139
139
 
140
140
  ### Rem Same Px
141
141
 
142
- Sets `1 rem = 1px` at the root for easier design-dev handoff. This calculation is done
143
- using `%`, so if the user adjusts the browser font sizes, those will still affect the page
144
- for accessibility purposes.
145
-
146
- Can sometimes mess up dev environment error messages though (the error UI becomes very,
147
- very small). That can be fixed of course, but just an FYI.
142
+ Sets `1 rem = 1px` at the root for easier design-dev hand-off. This calculation
143
+ is done using `%`, so if the user adjusts the browser font sizes, those will
144
+ still affect the page for accessibility purposes. Note this may affect
145
+ framework error debug message pages in development (e.g. Nuxt, Next, Astro, etc.).
148
146
 
149
147
  ```javascript
150
148
  import "css-preflight/rem-same-px.css"; // styles/rem-same-px.css
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "css-preflight",
4
- "version": "2.0.0",
4
+ "version": "2.0.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "CSS browser reset based on Tailwind's preflight, with optional enhancements.",