css-preflight 1.0.1 → 1.1.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.
package/README.md CHANGED
@@ -11,7 +11,7 @@ The following adjustments have been made to Tailwind's preflight, located in `st
11
11
 
12
12
  1. Tailwind-specific CSS variables removed.
13
13
  2. Tailwind postcss functions like `theme()` removed.
14
- 3. Properties with vendor prefixes (e.g. `-webkit-`, `-moz-`) have been removed, to avoid duplication
14
+ 3. Vendor prefixes (e.g. `-webkit-`, `-moz-`) from css properties have been removed, to avoid duplication
15
15
  from autoprefixer when used. Inline comments in the `preflight.css` source code indicate which of
16
16
  these have been adjusted and note the original existing prefix.
17
17
  4. system-ui fonts have been removed completely from `font-family` properties in exchange for
@@ -36,7 +36,7 @@ npm install css-preflight
36
36
 
37
37
  ## Usage
38
38
 
39
- The exports are broken down into 3 main CSS files. Completely
39
+ The exports are broken down into 4 main CSS files. Completely
40
40
  unprocessed so it's up to the dev to pass them through optimizations like
41
41
  Autoprefixer and minification.
42
42
 
@@ -50,14 +50,14 @@ import 'css-preflight'; // styles/preflight.css
50
50
  import 'css-preflight/preflight'; // ALIAS: styles/preflight.css
51
51
 
52
52
  import 'css-preflight/enhancements'; // styles/enhancements.css
53
-
53
+ import 'css-preflight/smooth-scroll'; // styles/smooth-scroll.css
54
54
  import 'css-preflight/rem-same-px'; // styles/rem-same-px.css
55
55
  ```
56
56
 
57
57
  #### Typical Setup
58
58
 
59
59
  ```javascript
60
- import 'css-preflight/preflight';
60
+ import 'css-preflight';
61
61
  import 'css-preflight/enhancements';
62
62
  ```
63
63
 
@@ -71,9 +71,12 @@ Both are exactly the same.
71
71
 
72
72
  These are small enhancements added to the main preflight:
73
73
 
74
- - Enables smooth scrolling to anchor points (e.g. #about). Disabled for `prefers-reduced-motion`.
75
74
  - Adds `text-wrap: balance` on h1-h6 and blockquote. Helps prevent hanging words on newlines.
76
75
 
76
+ ### Smooth Scroll
77
+
78
+ Enables smooth scrolling to anchor points (e.g. #about). Disabled for `prefers-reduced-motion`.
79
+
77
80
  ### Rem Same Px
78
81
 
79
82
  Sets rem equal to 1px at the root for easier design-dev handoff. This calculation is done
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": "1.0.1",
4
+ "version": "1.1.1",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "CSS browser reset based on Tailwind's preflight, with optional enhancements.",
@@ -29,6 +29,7 @@
29
29
  ".": "./styles/preflight.css",
30
30
  "./preflight": "./styles/preflight.css",
31
31
  "./enhancements": "./styles/enhancements.css",
32
+ "./smooth-scroll": "./styles/smooth-scroll.css",
32
33
  "./rem-same-px": "./styles/rem-same-px.css"
33
34
  },
34
35
  "files": [
@@ -42,10 +43,12 @@
42
43
  "@changesets/cli": "2.27.1",
43
44
  "stylelint": "15.11.0",
44
45
  "stylelint-config-standard": "34.0.0",
45
- "stylelint-prettier": "4.1.0"
46
+ "prettier": "3.1.0"
46
47
  },
47
48
  "scripts": {
48
- "lint": "stylelint \"./styles/*.css\"",
49
- "release": "changeset publish"
49
+ "stylelint": "stylelint \"./styles/*.css\"",
50
+ "prettier-check": "prettier --check ./styles/*.css",
51
+ "changeset:release": "changeset publish",
52
+ "changeset:add": "changeset"
50
53
  }
51
54
  }
@@ -1,18 +1,3 @@
1
- /*
2
- Adds smooth scrolling when a user is navigated to an
3
- anchor on a page.
4
- */
5
-
6
- :root {
7
- scroll-behavior: smooth;
8
- }
9
-
10
- @media (prefers-reduced-motion) {
11
- :root {
12
- scroll-behavior: auto;
13
- }
14
- }
15
-
16
1
  /*
17
2
  Helps prevent single words on a newline,
18
3
  which can make a title seem unbalanced.
@@ -0,0 +1,14 @@
1
+ /*
2
+ Adds smooth scrolling when a user is navigated to an
3
+ anchor on a page.
4
+ */
5
+
6
+ :root {
7
+ scroll-behavior: smooth;
8
+ }
9
+
10
+ @media (prefers-reduced-motion) {
11
+ :root {
12
+ scroll-behavior: auto;
13
+ }
14
+ }