@classic-homes/postcss-config 0.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/index.js +46 -0
  3. package/package.json +22 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @classic-homes/postcss-config
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - CI Release (e04f7bc): Fix usePersistedForm to extend useForm properly
package/index.js ADDED
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Shared PostCSS configuration for Classic Theme
3
+ *
4
+ * Provides CSS compatibility for older browsers that lack support for:
5
+ * - CSS @layer (Safari < 15.4, Chrome < 99, Firefox < 97)
6
+ * - :focus-visible (Safari < 15.4)
7
+ * - Other modern CSS features
8
+ *
9
+ * Plugin order is critical:
10
+ * 1. postcss-cascade-layers - Must transform @layer BEFORE Tailwind processes CSS
11
+ * 2. tailwindcss - Processes Tailwind directives
12
+ * 3. postcss-preset-env - Polyfills other modern CSS features
13
+ * 4. autoprefixer - Adds vendor prefixes (included in postcss-preset-env)
14
+ */
15
+ export default {
16
+ plugins: {
17
+ // Transform @layer rules for browsers without native support
18
+ // Must run BEFORE tailwindcss
19
+ '@csstools/postcss-cascade-layers': {},
20
+
21
+ // Process Tailwind directives
22
+ tailwindcss: {},
23
+
24
+ // Modern CSS polyfills
25
+ 'postcss-preset-env': {
26
+ stage: 2,
27
+ features: {
28
+ // Handled by dedicated plugin above
29
+ 'cascade-layers': false,
30
+ // Enable :focus-visible polyfill
31
+ 'focus-visible-pseudo-class': true,
32
+ // Enable flexbox gap polyfill
33
+ 'gap-properties': true,
34
+ // CSS custom properties work in all target browsers
35
+ 'custom-properties': false,
36
+ // Disable :is() polyfill - Tailwind's complex selectors can't be transformed
37
+ // and :is() is supported in all target browsers (Safari 14+, Chrome 88+, Firefox 78+)
38
+ 'is-pseudo-class': false,
39
+ },
40
+ // autoprefixer is included in preset-env
41
+ autoprefixer: {
42
+ flexbox: 'no-2009',
43
+ },
44
+ },
45
+ },
46
+ };
package/package.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "@classic-homes/postcss-config",
3
+ "version": "0.1.1",
4
+ "description": "Shared PostCSS configuration for Classic Theme with browser compatibility",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": "./index.js"
9
+ },
10
+ "peerDependencies": {
11
+ "postcss": ">=8.0.0",
12
+ "tailwindcss": ">=3.0.0"
13
+ },
14
+ "dependencies": {
15
+ "@csstools/postcss-cascade-layers": "^5.0.0",
16
+ "autoprefixer": "^10.4.0",
17
+ "postcss-preset-env": "^10.0.0"
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ }
22
+ }