Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 00e077979cef25703b37fb5db66bee1689f3c462
Choose a base ref
...
head repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 587a0ba6be5ac2df454b9f9e119ed7401ae0a052
Choose a head ref

Commits on Jun 13, 2022

  1. prefers color scheme (#436)

    * prefers-color-scheme : cleanup
    
    * cleanup
    
    * fix
    
    * more fixes
    
    * Update plugins/css-prefers-color-scheme/CHANGELOG.md
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    
    * peer dependency
    
    * import
    
    * update change log
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    romainmenke and Antonio-Laguna authored Jun 13, 2022
    Copy the full SHA
    eb9c086 View commit details

Commits on Jun 18, 2022

  1. Copy the full SHA
    5629794 View commit details
  2. update tests (#485)

    romainmenke authored Jun 18, 2022
    Copy the full SHA
    08c25af View commit details

Commits on Jun 23, 2022

  1. Copy the full SHA
    3a3d59e View commit details

Commits on Jun 25, 2022

  1. Copy the full SHA
    e8401fe View commit details
  2. css-has-pseudo (#473)

    * css-has-pseudo
    
    * preset-env
    
    * update tests
    
    * fixes
    
    * docs
    
    * docs
    
    * changelog
    
    * fix
    
    * fix
    
    * fix
    
    * fix
    romainmenke authored Jun 25, 2022
    Copy the full SHA
    9a0ab6c View commit details
  3. Copy the full SHA
    68a1239 View commit details

Commits on Jun 27, 2022

  1. CSS Blank Pseudo (#486)

    * WIP
    
    * Tests and docs
    
    * Rewriting browser
    
    * Browser tests running
    
    * Touch to docs
    
    * Finishing
    
    * Minor updates
    
    * Moving the file to be `.mjs
    
    * Linted now
    
    * css-blank-pseudo : code review (#501)
    
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    Antonio-Laguna and romainmenke authored Jun 27, 2022
    Copy the full SHA
    d58c1a2 View commit details
  2. Copy the full SHA
    4982633 View commit details
  3. Updating package-lock

    Antonio-Laguna committed Jun 27, 2022
    Copy the full SHA
    1f54269 View commit details
  4. Updating lock again

    Antonio-Laguna committed Jun 27, 2022
    Copy the full SHA
    1f48bd4 View commit details
  5. Updating CHANGELOG

    Antonio-Laguna committed Jun 27, 2022
    Copy the full SHA
    96b3c13 View commit details

Commits on Jun 30, 2022

  1. Copy the full SHA
    32b84c7 View commit details

Commits on Jul 1, 2022

  1. Updating Focus Visible (#513)

    * Updating Focus Visible
    
    * Returning CHANGELOG
    
    * Updating tests
    
    * focus-visible : code review (#514)
    
    * Updating CHANGELOG
    
    * focus-visible : code review (#514)
    
    Co-authored-by: Romain Menke <11521496+romainmenke@users.noreply.github.com>
    Antonio-Laguna and romainmenke authored Jul 1, 2022
    Copy the full SHA
    0878904 View commit details

Commits on Jul 2, 2022

  1. Copy the full SHA
    1597155 View commit details

Commits on Jul 3, 2022

  1. Copy the full SHA
    900f867 View commit details
  2. Copy the full SHA
    2350a29 View commit details
  3. Updating Focus Within (#516)

    * Starting focus-within plugin
    
    * Finishing focus within
    
    * Updating tests
    
    * Fixed tests after swapping preserve
    
    * Adding CHANGELOG
    
    * Updating tests
    
    * Generating docs
    
    * Better options for older browsers
    Antonio-Laguna authored Jul 3, 2022
    Copy the full SHA
    23c9a6f View commit details
  4. postcss-blank : browser compat (#519)

    * postcss-blank : browser compat
    
    * fix
    
    * fix
    romainmenke authored Jul 3, 2022
    Copy the full SHA
    30f114f View commit details
  5. postcss-focus-within : browser compat (#520)

    * postcss-focus-within : browser compat
    
    * lint
    romainmenke authored Jul 3, 2022
    Copy the full SHA
    a3f3fc7 View commit details

Commits on Jul 7, 2022

  1. Adding global class to CSS Blank (#524)

    * Better handling for classList
    
    * Refactoring to reuse code
    
    * Appending `js-blank-pseudo` on load
    
    * Only apply if not applied before to avoid double classes
    
    * Updating docs
    
    * Class should happen always
    
    * Ensuring ready class is handled via plugin
    
    * Updating tests
    
    * Updating docs
    
    * Handling preset-env tests for blank pseudo
    
    * Conflicting test
    Antonio-Laguna authored Jul 7, 2022
    Copy the full SHA
    d12612a View commit details
  2. Copy the full SHA
    35be577 View commit details
  3. fmt

    romainmenke committed Jul 7, 2022
    Copy the full SHA
    ff12c33 View commit details
  4. css has pseudo : pseudo element support and .js-has-pseudo class (#525)

    * css has pseudo : pseudo element support and .js-has-pseudo class
    
    * update tests
    romainmenke authored Jul 7, 2022
    Copy the full SHA
    446e3df View commit details
  5. fix

    romainmenke committed Jul 7, 2022
    Copy the full SHA
    9dd08ac View commit details
  6. fix

    romainmenke committed Jul 7, 2022
    Copy the full SHA
    911f1af View commit details
  7. Copy the full SHA
    b41750a View commit details

Commits on Jul 8, 2022

  1. Copy the full SHA
    724cb41 View commit details
  2. Copy the full SHA
    9e9557b View commit details
  3. Copy the full SHA
    d5915fb View commit details
  4. Copy the full SHA
    6b25e40 View commit details
  5. CSS Has Pseudo 4.0.0

    Antonio-Laguna committed Jul 8, 2022
    Copy the full SHA
    0a29ca0 View commit details
  6. Copy the full SHA
    0d936e1 View commit details
  7. Copy the full SHA
    f262521 View commit details
  8. Copy the full SHA
    9825ab3 View commit details
  9. Copy the full SHA
    cf6faa1 View commit details
  10. update cli

    romainmenke committed Jul 8, 2022
    Copy the full SHA
    926a54e View commit details

Commits on Jul 18, 2022

  1. Copy the full SHA
    d124dd5 View commit details

Commits on Jul 28, 2022

  1. Copy the full SHA
    2b27d1f View commit details

Commits on Jul 30, 2022

  1. add : disablePolyfillReadyClass (#558)

    * add : disablePolyfillReadyClass
    
    * Apply suggestions from code review
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    
    Co-authored-by: Antonio Laguna <sombragriselros@gmail.com>
    romainmenke and Antonio-Laguna authored Jul 30, 2022
    Copy the full SHA
    658e036 View commit details
  2. Extra space removal

    Antonio-Laguna committed Jul 30, 2022
    Copy the full SHA
    7eca713 View commit details
  3. CSS Blank Pseudo 4.1.0

    Antonio-Laguna committed Jul 30, 2022
    Copy the full SHA
    494b90d View commit details
  4. Copy the full SHA
    e18c674 View commit details
  5. Copy the full SHA
    e526043 View commit details

Commits on Aug 7, 2022

  1. Copy the full SHA
    9c4a275 View commit details

Commits on Aug 8, 2022

  1. Copy the full SHA
    c3e6532 View commit details

Commits on Aug 16, 2022

  1. Copy the full SHA
    e5e0a76 View commit details

Commits on Aug 23, 2022

  1. Copy the full SHA
    844e062 View commit details
  2. Merge branch 'main' into postcss-preset-env--v8

    # Conflicts:
    #	experimental/css-has-pseudo/package.json
    #	package-lock.json
    Antonio-Laguna committed Aug 23, 2022
    Copy the full SHA
    4c3a0df View commit details
  3. CSS Blank Pseudo 4.1.1

    Antonio-Laguna committed Aug 23, 2022
    Copy the full SHA
    48f47ae View commit details
Showing 1,025 changed files with 58,224 additions and 10,737 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/css-issue.yml
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ body:
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
- PostCSS Media Queries Aspect-Ratio Number Values
- PostCSS Media Query Ranges
- PostCSS Nested Calc
- PostCSS Nesting
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/plugin-issue.yml
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ body:
- PostCSS Is Pseudo Class
- PostCSS Lab Function
- PostCSS Logical
- PostCSS Media Queries Aspect-Ratio Number Values
- PostCSS Media Query Ranges
- PostCSS Nested Calc
- PostCSS Nesting
4 changes: 3 additions & 1 deletion .github/bin/format-package-json.mjs
Original file line number Diff line number Diff line change
@@ -64,7 +64,9 @@ const formatted = {};
formatted.private = packageJSONInfo.private;
delete packageJSONInfo.private;

formatted.engines = packageJSONInfo.engines;
formatted.engines = {
node: '^14 || ^16 || >=18'
};
delete packageJSONInfo.engines;

formatted.type = packageJSONInfo.type;
11 changes: 11 additions & 0 deletions .github/bin/generate-docs/install-template.md
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ npm install postcss <packageName> --save-dev
Use it as a [PostCSS] plugin:

```js
// commonjs
const postcss = require('postcss');
const <exportName> = require('<packageName>');

@@ -24,6 +25,16 @@ postcss([
]).process(YOUR_CSS /*, processOptions */);
```

```js
// esm
import postcss from 'postcss';
import <exportName> from '<packageName>';

postcss([
<exportName>(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);
```

## PostCSS CLI

Add [PostCSS CLI] to your project:
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -136,6 +136,10 @@
- plugins/postcss-logical/**
- experimental/postcss-logical/**

"plugins/postcss-media-queries-aspect-ratio-number-values":
- plugins/postcss-media-queries-aspect-ratio-number-values/**
- experimental/postcss-media-queries-aspect-ratio-number-values/**

"plugins/postcss-media-query-ranges":
- plugins/postcss-media-query-ranges/**
- experimental/postcss-media-query-ranges/**
53 changes: 11 additions & 42 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -25,17 +25,17 @@ jobs:
strategy:
fail-fast: false
# Test node 16/18 on ubuntu
# Test node 16 on macos/windows
# Enable annotations only for node 16 + ubuntu
# Test node 18 on macos/windows
# Enable annotations only for node 18 + ubuntu
matrix:
os: [ubuntu-latest]
node: [16, 18]
include:
- os: macos-latest
node: 16
node: 18
- os: windows-latest
node: 16
- node: 16
node: 18
- node: 18
is_base_node_version: true
- os: ubuntu-latest
is_base_os_version: true
@@ -47,49 +47,24 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: env
run: |
echo 'DIST_RESTORE_KEYS<<EOF' >> $GITHUB_ENV
echo "$(git --no-pager log -9 --skip 1 --no-merges --pretty=format:'%H--test-dist-${{ matrix.node }}-${{ matrix.os }}')" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
echo "COMMIT_SHA=$(git --no-pager log -1 --no-merges --pretty=format:'%H')" >> $GITHUB_ENV
echo "BUILD_AND_TEST_ALL_PACKAGES=$(echo ${{ github.event.inputs.run_index }})" >> $GITHUB_ENV
- name: previous build artifacts cache
uses: actions/cache@v3.0.11
with:
path: |
.cached-commit
cli/*/dist/**
experimental/*/dist/**
packages/*/dist/**
plugin-packs/*/dist/**
plugins/*/dist/**
key: ${{ env.COMMIT_SHA }}--test-dist-${{ matrix.node }}-${{ matrix.os }}
restore-keys: ${{ env.DIST_RESTORE_KEYS }}

- name: npm ci
run: |
npm ci --ignore-scripts
- name: determine modified workspaces
run: |
echo "MODIFIED_WORKSPACES=$(node './.github/bin/modified-workspaces/log-modified-workspaces.mjs')" >> $GITHUB_ENV
# Build, lint and PostCSS Tape tests must all work and pass :
# - with exact dependencies from package-lock.json
# - without requiring postinstall scripts from dependencies to run
- name: build
run: |
npm run build --if-present $MODIFIED_WORKSPACES
npm run build --if-present
- name: lint
run: npm run lint --if-present $MODIFIED_WORKSPACES
run: npm run lint --if-present
if: matrix.is_base_node_version && matrix.is_base_os_version

# Basic tests
- name: test
run: npm run test --if-present $MODIFIED_WORKSPACES
run: npm run test --if-present
env:
ENABLE_ANNOTATIONS_FOR_NODE: ${{ matrix.is_base_node_version }}
ENABLE_ANNOTATIONS_FOR_OS: ${{ matrix.is_base_os_version }}
@@ -99,14 +74,14 @@ jobs:
- name: test:cli
run: |
npm install --ignore-scripts
npm run test:cli --if-present $MODIFIED_WORKSPACES
npm run test:cli --if-present
# Browser Tests
# running "npm ci" again, but allowing scripts so that Chrome is installed
- name: test:browser
run: |
npm ci
npm run test:browser --if-present $MODIFIED_WORKSPACES
npm run test:browser --if-present
if: matrix.is_base_node_version && matrix.is_base_os_version

# E2E Tests
@@ -125,11 +100,5 @@ jobs:
if: matrix.is_base_node_version && matrix.is_base_os_version

- name: test:deno
run: npm run test:deno --if-present $MODIFIED_WORKSPACES
run: npm run test:deno --if-present
if: matrix.is_base_node_version && matrix.is_base_os_version

# record the current commit for the cache at the end of the job
# must be the last step
- name: record current commit
run: |
echo "$(git --no-pager log -1 --no-merges --pretty=format:'%H')" > .cached-commit
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.1
v18.8.0
1 change: 1 addition & 0 deletions cli/csstools-cli/.gitignore
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@ browser.js
*.log*
*.result.css
*.result.css.map
*.result.html
!.editorconfig
!.gitignore
!.rollup.js
2 changes: 1 addition & 1 deletion cli/csstools-cli/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.13.1
v18.8.0
6 changes: 6 additions & 0 deletions cli/csstools-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes to CSSTools CLI

### Unreleased (major)

- Updated: Support for Node v14+ (major).
- Remove `postcss-env-function` (breaking).
- Remove `importFrom` and `exportTo` plugin options (breaking).

### 1.4.0 (June 3, 2022)

- Added `@csstools/postcss-cascade-layers`
4 changes: 0 additions & 4 deletions cli/csstools-cli/README.md
Original file line number Diff line number Diff line change
@@ -98,8 +98,6 @@ Plugin Options:
browsers string
autoprefixer object
preserve boolean
importFrom string
exportTo string
{
"stage": 0,
@@ -116,8 +114,6 @@ Plugin Options:
"grid": true
},
"preserve": false,
"importFrom": "path/to/file.css",
"exportTo": "path/to/file.css"
}
```

17 changes: 8 additions & 9 deletions cli/csstools-cli/package.json
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
"url": "https://opencollective.com/csstools"
},
"engines": {
"node": "^12 || ^14 || >=16"
"node": "^14 || ^16 || >=18"
},
"bin": {
"csstools-cli": "dist/cli.cjs"
@@ -43,9 +43,9 @@
"@csstools/postcss-stepped-value-functions": "^1.0.0",
"@csstools/postcss-trigonometric-functions": "^1.0.0",
"@csstools/postcss-unset-value": "^1.0.1",
"css-blank-pseudo": "^3.0.3",
"css-has-pseudo": "^3.0.4",
"css-prefers-color-scheme": "^6.0.3",
"css-blank-pseudo": "^4.0.0",
"css-has-pseudo": "^4.0.0",
"css-prefers-color-scheme": "^7.0.0",
"postcss-attribute-case-insensitive": "^5.0.1",
"postcss-color-functional-notation": "^4.2.3",
"postcss-color-hex-alpha": "^8.0.3",
@@ -55,25 +55,24 @@
"postcss-custom-selectors": "^6.0.2",
"postcss-dir-pseudo-class": "^6.0.4",
"postcss-double-position-gradients": "^3.1.1",
"postcss-env-function": "^4.0.6",
"postcss-focus-visible": "^6.0.4",
"postcss-focus-within": "^5.0.4",
"postcss-focus-visible": "^7.0.0",
"postcss-focus-within": "^6.0.0",
"postcss-gap-properties": "^3.0.3",
"postcss-image-set-function": "^4.0.6",
"postcss-lab-function": "^4.2.0",
"postcss-logical": "^5.0.4",
"postcss-nesting": "^10.1.7",
"postcss-overflow-shorthand": "^3.0.3",
"postcss-place": "^7.0.4",
"postcss-preset-env": "^7.7.1",
"postcss-preset-env": "^8.0.0-alpha.0",
"postcss-pseudo-class-any-link": "^7.1.4",
"postcss-selector-not": "^6.0.0"
},
"devDependencies": {
"postcss": "^8.4.14"
},
"scripts": {
"build": "rollup -c ../../rollup/default.js",
"build": "rollup -c ../../rollup/default.mjs",
"clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
"csstools-cli": "csstools-cli",
"lint": "npm run lint:eslint && npm run lint:package-json",
4 changes: 0 additions & 4 deletions cli/csstools-cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ import postcssCustomProperties from './plugins/postcss-custom-properties';
import postcssCustomSelectors from './plugins/postcss-custom-selectors';
import postcssDirPseudoClass from './plugins/postcss-dir-pseudo-class';
import postcssDoublePositionGradients from './plugins/postcss-double-position-gradients';
import postcssEnvFunction from './plugins/postcss-env-function';
import postcssFocusVisible from './plugins/postcss-focus-visible';
import postcssFocusWithin from './plugins/postcss-focus-within';
import postcssFontFormatKeywords from './plugins/postcss-font-format-keywords';
@@ -80,9 +79,6 @@ function main() {
case 'postcss-double-position-gradients':
postcssDoublePositionGradients();
return;
case 'postcss-env-function':
postcssEnvFunction();
return;
case 'postcss-focus-visible':
postcssFocusVisible();
return;
4 changes: 1 addition & 3 deletions cli/csstools-cli/src/plugins/postcss-custom-media.ts
Original file line number Diff line number Diff line change
@@ -4,14 +4,12 @@ import { cli, helpTextLogger } from '@csstools/base-cli';
export default function postcssCustomMedia() {
cli(
plugin,
['importFrom', 'exportTo', 'preserve'],
['preserve'],
helpTextLogger(
'@csstools/cli postcss-custom-media',
'PostCSS Custom Media',
'Lets you define @custom-media in CSS following the Custom Media Specification',
{
importFrom: ['import-media.js'],
exportTo: ['export-media.js'],
preserve: true,
},
),
4 changes: 1 addition & 3 deletions cli/csstools-cli/src/plugins/postcss-custom-properties.ts
Original file line number Diff line number Diff line change
@@ -4,14 +4,12 @@ import { cli, helpTextLogger } from '@csstools/base-cli';
export default function postcssCustomProperties() {
cli(
plugin,
['importFrom', 'exportTo', 'preserve'],
['preserve'],
helpTextLogger(
'@csstools/cli postcss-custom-properties',
'PostCSS Custom Properties',
'Lets you use Custom Properties in CSS, following the CSS Custom Properties specification.',
{
importFrom: ['import-variables.js'],
exportTo: ['export-variables.js'],
preserve: true,
},
),
4 changes: 1 addition & 3 deletions cli/csstools-cli/src/plugins/postcss-custom-selectors.ts
Original file line number Diff line number Diff line change
@@ -4,14 +4,12 @@ import { cli, helpTextLogger } from '@csstools/base-cli';
export default function postcssCustomSelectors() {
cli(
plugin,
['importFrom', 'exportTo', 'preserve'],
['preserve'],
helpTextLogger(
'@csstools/cli postcss-custom-selectors',
'PostCSS Custom Selectors',
'Lets you define @custom-selector in CSS following the Custom Selectors Specification',
{
importFrom: ['import-selectors.js'],
exportTo: ['export-selectors.js'],
preserve: true,
},
),
18 changes: 0 additions & 18 deletions cli/csstools-cli/src/plugins/postcss-env-function.ts

This file was deleted.

4 changes: 0 additions & 4 deletions cli/csstools-cli/src/plugins/postcss-preset-env.ts
Original file line number Diff line number Diff line change
@@ -11,8 +11,6 @@ export default function postcssPresetEnv() {
'browsers',
'autoprefixer',
'preserve',
'importFrom',
'exportTo',
'enableClientSidePolyfills',
],
helpTextLogger(
@@ -29,8 +27,6 @@ export default function postcssPresetEnv() {
browsers: 'last 2 versions',
autoprefixer: { grid: true },
preserve: false,
importFrom: 'path/to/file.css',
exportTo: 'path/to/file.css',
enableClientSidePolyfills: false,
},
),
2 changes: 1 addition & 1 deletion cli/csstools-cli/test/cli/basic.expect.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading