Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
dfee4be
wip
romainmenke Dec 11, 2021
abb9b10
wip
romainmenke Dec 11, 2021
29300f4
wip
romainmenke Dec 11, 2021
733912c
wip
romainmenke Dec 13, 2021
f3ccb44
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Dec 13, 2021
23d531a
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Dec 19, 2021
3e6cdfa
wip
romainmenke Dec 19, 2021
52c0127
wip
romainmenke Dec 19, 2021
e661914
wip
romainmenke Dec 19, 2021
586edd5
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Dec 20, 2021
d8ef9aa
postcss-hwb-function
romainmenke Dec 20, 2021
90ea09a
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Jan 11, 2022
3c7bc86
lint
romainmenke Jan 11, 2022
00d8efe
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Jan 20, 2022
b22351d
updates
romainmenke Jan 20, 2022
7e76ea8
updates
romainmenke Jan 20, 2022
0f04e1e
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Jan 21, 2022
2e37146
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Jan 26, 2022
c08f66f
add examples from wpt
romainmenke Jan 26, 2022
a6b0f25
cleaner
romainmenke Jan 26, 2022
111071f
correct link
romainmenke Jan 26, 2022
e6793c7
more tests
romainmenke Jan 27, 2022
ae65d01
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 2, 2022
6b94ff6
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 3, 2022
2e7dac1
wip
romainmenke Feb 4, 2022
7648de7
wip
romainmenke Feb 4, 2022
e0b10d0
wip
romainmenke Feb 4, 2022
dd9105e
add W3C license and attributions for all code copied or derived from …
romainmenke Feb 4, 2022
3f8d7f8
all color profiles
romainmenke Feb 4, 2022
a0871d5
wip
romainmenke Feb 5, 2022
966eba8
Update plugins/postcss-lab-function/src/index.ts
romainmenke Feb 5, 2022
c6d9414
fixes
romainmenke Feb 5, 2022
d7a5bad
update tests
romainmenke Feb 5, 2022
2db8d2d
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 7, 2022
77ecb8b
updates
romainmenke Feb 7, 2022
04e0956
updates
romainmenke Feb 7, 2022
51ab47b
fix
romainmenke Feb 7, 2022
9829f0f
bring progressive custom properties to postcss-preset-env
romainmenke Feb 7, 2022
ae67aa5
update tests
romainmenke Feb 7, 2022
6e96c06
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 11, 2022
5b2c608
cleanup
romainmenke Feb 11, 2022
cabe8e5
add changelog
romainmenke Feb 11, 2022
7d5fb58
Apply suggestions from code review
romainmenke Feb 11, 2022
d918323
backport from lab
romainmenke Feb 11, 2022
c1ae079
Merge branch 'css-color-4--affectionate-crab-6c5bb7cdbb' of https://g…
romainmenke Feb 11, 2022
061431a
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 12, 2022
c016739
update tests
romainmenke Feb 12, 2022
ac14ff0
Merge remote-tracking branch 'origin/main' into css-color-4--affectio…
romainmenke Feb 12, 2022
977da81
prepare release
romainmenke Feb 12, 2022
ff115a8
add test in preset-env for custom props
romainmenke Feb 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"workspaces": [
"packages/*",
"plugins/postcss-progressive-custom-properties",
"plugins/*",
"plugin-packs/*",
"cli/*",
Expand Down
7 changes: 7 additions & 0 deletions plugin-packs/postcss-preset-env/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changes to PostCSS Preset Env

### Unreleased (patch)

- Updated `postcss-lab-function` to `4.1.0`.
- Updated `@csstools/postcss-progressive-custom-properties` to `1.1.0`.

`postcss-lab-function` now supports [wide gamut colors](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#displayp3) and [out of gamut color mapping](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#displayp3).

### 7.3.1 (February 3, 2022)

- Ensured that `debug` option uses a single instance per run, this allows for `debug` to work on parallel runs within CI environments.
Expand Down
1 change: 1 addition & 0 deletions plugin-packs/postcss-preset-env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@csstools/postcss-hwb-function": "^1.0.0",
"@csstools/postcss-is-pseudo-class": "^2.0.0",
"@csstools/postcss-normalize-display-values": "^1.0.0",
"@csstools/postcss-progressive-custom-properties": "^1.1.0",
"autoprefixer": "^10.4.2",
"browserslist": "^4.19.1",
"css-blank-pseudo": "^3.0.2",
Expand Down
14 changes: 10 additions & 4 deletions plugin-packs/postcss-preset-env/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import autoprefixer from 'autoprefixer';
import cssdb from 'cssdb';
import writeToExports from './side-effects/write-to-exports.mjs';
import { pluginIdHelp } from './plugins/plugin-id-help.mjs';
import { newLogger } from './log/helper.mjs';
import logFeaturesList from './log/features-list.mjs';
import { listFeatures } from './lib/list-features.mjs';
import postcssProgressiveCustomProperties from '@csstools/postcss-progressive-custom-properties';
import writeToExports from './side-effects/write-to-exports.mjs';
import { initializeSharedOptions } from './lib/shared-options.mjs';
import { listFeatures } from './lib/list-features.mjs';
import { newLogger } from './log/helper.mjs';
import { pluginIdHelp } from './plugins/plugin-id-help.mjs';


const plugin = (opts) => {
const logger = newLogger();
Expand All @@ -27,6 +29,10 @@ const plugin = (opts) => {
);
}

plugins.push(
postcssProgressiveCustomProperties(),
);

logFeaturesList(features, options, logger);

const internalPlugin = () => {
Expand Down
3 changes: 3 additions & 0 deletions plugin-packs/postcss-preset-env/src/lib/format-feature.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export function formatStagedFeature(cssdbList, browsers, features, feature, shar
}
}

// postcss-preset-env : option overrides
options.enableProgressiveCustomProperties = false;

if (feature.plugin.postcss && typeof feature.plugin === 'function') {
plugin = feature.plugin(options);
} else if (feature.plugin && feature.plugin.default && typeof feature.plugin.default === 'function' && feature.plugin.default.postcss) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ assert.deepStrictEqual(
],
vendors_implementations: 1,
plugin: true,
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
);
Expand Down Expand Up @@ -55,7 +60,12 @@ assert.deepStrictEqual(
],
vendors_implementations: 1,
plugin: true,
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
);
Expand Down Expand Up @@ -86,7 +96,13 @@ assert.deepStrictEqual(
],
vendors_implementations: 1,
plugin: true,
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true }, shared: true },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
shared: true,
},
id: 'any-link-pseudo-class',
},
);
Expand Down Expand Up @@ -115,7 +131,13 @@ assert.deepStrictEqual(
],
vendors_implementations: 1,
plugin: true,
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true }, shared: true },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
shared: true,
},
id: 'any-link-pseudo-class',
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
},
vendors_implementations: 3,
id: 'any-link-pseudo-class',
},
Expand Down Expand Up @@ -52,8 +57,11 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
vendors_implementations: 3,
pluginOptions: {
subFeatures: { areaHrefNeedsFixing: true },
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
{
Expand All @@ -67,8 +75,8 @@ assert.deepStrictEqual(
'samsung >= 1', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: {},
vendors_implementations: 0,
pluginOptions: { enableProgressiveCustomProperties: false },
id: 'blank-pseudo-class',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ assert.deepStrictEqual(
'baidu >= 1', 'kaios >= 1',
],
vendors_implementations: 3,
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
pluginOptions: {
subFeatures: {
areaHrefNeedsFixing: true,
},
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { preserve: true, subFeatures: { areaHrefNeedsFixing: true } },
vendors_implementations: 3,
pluginOptions: {
subFeatures: { areaHrefNeedsFixing: true },
preserve: true,
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
{
Expand All @@ -35,8 +39,8 @@ assert.deepStrictEqual(
'samsung >= 1', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { preserve: true },
vendors_implementations: 0,
pluginOptions: { preserve: true, enableProgressiveCustomProperties: false },
id: 'blank-pseudo-class',
},
],
Expand Down Expand Up @@ -67,8 +71,12 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { preserve: false, subFeatures: { areaHrefNeedsFixing: true } },
vendors_implementations: 3,
pluginOptions: {
subFeatures: { areaHrefNeedsFixing: true },
preserve: false,
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
{
Expand All @@ -82,8 +90,8 @@ assert.deepStrictEqual(
'samsung >= 1', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { preserve: false },
vendors_implementations: 0,
pluginOptions: { preserve: false, enableProgressiveCustomProperties: false },
id: 'blank-pseudo-class',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
vendors_implementations: 3,
pluginOptions: {
subFeatures: { areaHrefNeedsFixing: true },
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
{
Expand All @@ -35,8 +38,8 @@ assert.deepStrictEqual(
'samsung >= 1', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: {},
vendors_implementations: 0,
pluginOptions: { enableProgressiveCustomProperties: false },
id: 'blank-pseudo-class',
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ assert.deepStrictEqual(
'samsung < 1.0', 'and_qq >= 1',
'baidu >= 1', 'kaios >= 1',
],
pluginOptions: { subFeatures: { areaHrefNeedsFixing: true } },
vendors_implementations: 3,
pluginOptions: {
subFeatures: { areaHrefNeedsFixing: true },
enableProgressiveCustomProperties: false,
},
id: 'any-link-pseudo-class',
},
],
Expand Down
12 changes: 12 additions & 0 deletions plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
--order: 1;
}

.test-custom-property-fallbacks {
--firebrick: rgb(179, 35, 35);
}

@supports (color: color(display-p3 0 0 0)) {
.test-custom-property-fallbacks {
--firebrick: color(display-p3 0.64331 0.19245 0.16771);
}
}

.test-custom-properties {
order: 1;
order: var(--order);
Expand Down Expand Up @@ -116,7 +126,9 @@

.test-lab-function {
background-color: rgb(179, 35, 35);
background-color: color(display-p3 0.64331 0.19245 0.16771);
color: rgba(179, 34, 35, 0.5);
color: color(display-p3 0.64368 0.19188 0.16791 / 50%);
order: 17;
}

Expand Down
Loading