Skip to content

Commit fda9a3a

Browse files
authored
update cssdb (#574)
* add a test for logical float * update cssdb * update cssdb * add new plugins and update changelog
1 parent e298b2a commit fda9a3a

30 files changed

+748
-430
lines changed

package-lock.json

Lines changed: 130 additions & 350 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin-packs/postcss-preset-env/CHANGELOG.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
11
# Changes to PostCSS Preset Env
22

3+
### Unreleased (minor)
4+
5+
- Added `@csstools/postcss-nested-calc` <br/> [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nested-calc#readme) for usage details.
6+
- Added `@csstools/postcss-text-decoration-shorthand` <br/> [Check the plugin README](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-text-decoration-shorthand#readme) for usage details.
7+
- Update `@csstools/postcss-cascade-layers` to `1.0.5` (patch)
8+
- Update `@csstools/postcss-color-function` to `1.1.1` (patch)
9+
- Update `@csstools/postcss-font-format-keywords` to `1.0.1` (patch)
10+
- Update `@csstools/postcss-hwb-function` to `1.0.2` (patch)
11+
- Update `@csstools/postcss-ic-unit` to `1.0.1` (patch)
12+
- Update `@csstools/postcss-is-pseudo-class` to `2.0.7` (patch)
13+
- Update `@csstools/postcss-normalize-display-values` to `1.0.1` (patch)
14+
- Update `@csstools/postcss-oklab-function` to `1.1.1` (patch)
15+
- Update `@csstools/postcss-stepped-value-functions` to `1.0.1` (patch)
16+
- Update `@csstools/postcss-trigonometric-functions` to `1.0.2` (patch)
17+
- Update `@csstools/postcss-unset-value` to `1.0.2` (patch)
18+
- Update `autoprefixer` to `10.4.8` (patch)
19+
- Update `browserslist` to `4.21.3` (patch)
20+
- Update `cssdb` to `7.0.0` (major)
21+
- Update `postcss-attribute-case-insensitive` to `5.0.2` (patch)
22+
- Update `postcss-color-functional-notation` to `4.2.4` (patch)
23+
- Update `postcss-color-rebeccapurple` to `7.1.1` (patch)
24+
- Update `postcss-dir-pseudo-class` to `6.0.5` (patch)
25+
- Update `postcss-double-position-gradients` to `3.1.2` (patch)
26+
- Update `postcss-gap-properties` to `3.0.5` (patch)
27+
- Update `postcss-image-set-function` to `4.0.7` (patch)
28+
- Update `postcss-lab-function` to `4.2.1` (patch)
29+
- Update `postcss-nesting` to `10.1.10` (patch)
30+
- Update `postcss-overflow-shorthand` to `3.0.4` (patch)
31+
- Update `postcss-place` to `7.0.5` (patch)
32+
- Update `postcss-pseudo-class-any-link` to `7.1.6` (patch)
33+
- Update `postcss-selector-not` to `6.0.1` (patch)
34+
335
### 7.7.2 (June 23, 2022)
436

537
- Fix `op_mini all` not working as a browser list.
638
- Updated `postcss-color-rebeccapurple` to `7.1.0` (minor)
739
- Updated `browserslist` to `4.21.0` (minor)
8-
- Updated `csstools/postcss-cascade-layers` to `1.0.4` (patch)
9-
- Updated `csstools/postcss-is-pseudo-class` to `2.0.6` (patch)
40+
- Updated `@csstools/postcss-cascade-layers` to `1.0.4` (patch)
41+
- Updated `@csstools/postcss-is-pseudo-class` to `2.0.6` (patch)
1042
- Updated `postcss-color-hex-alpha` to `8.0.4` (patch)
1143
- Updated `postcss-custom-media` to `8.0.2` (patch)
1244
- Updated `postcss-custom-properties` to `12.1.8` (patch)

plugin-packs/postcss-preset-env/FEATURES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ The `ID` listed is the key for PostCSS Preset Env configuration in your project.
3434
| `lab-function` | `lab()` Function | [example](https://preset-env.cssdb.org/features/#lab-function) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-lab-function#readme) |
3535
| `logical-properties-and-values` | Logical Properties and Values | [example](https://preset-env.cssdb.org/features/#logical-properties-and-values) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical#readme) |
3636
| `media-query-ranges` | Media Query Ranges | [example](https://preset-env.cssdb.org/features/#media-query-ranges) | [docs](https://github.com/postcss/postcss-media-minmax#readme) |
37+
| `nested-calc` | Nested `calc()` | [example](https://preset-env.cssdb.org/features/#nested-calc) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nested-calc#readme) |
3738
| `nesting-rules` | Nesting Rules | [example](https://preset-env.cssdb.org/features/#nesting-rules) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting#readme) |
3839
| `not-pseudo-class` | `:not()` Negation List Pseudo-Class | [example](https://preset-env.cssdb.org/features/#not-pseudo-class) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-selector-not#readme) |
3940
| `oklab-function` | `oklab` and `oklch` color functions | [example](https://preset-env.cssdb.org/features/#oklab-function) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-oklab-function#readme) |
@@ -45,6 +46,7 @@ The `ID` listed is the key for PostCSS Preset Env configuration in your project.
4546
| `rebeccapurple-color` | `rebeccapurple` Color | [example](https://preset-env.cssdb.org/features/#rebeccapurple-color) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-color-rebeccapurple#readme) |
4647
| `stepped-value-functions` | `round()`, `mod()` and `rem()` functions | [example](https://preset-env.cssdb.org/features/#stepped-value-functions) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme) |
4748
| `system-ui-font-family` | `system-ui` Font Family | [example](https://preset-env.cssdb.org/features/#system-ui-font-family) | [docs](https://github.com/JLHwung/postcss-font-family-system-ui#readme) |
49+
| `text-decoration-shorthand` | `text-decoration` shorthand | [example](https://preset-env.cssdb.org/features/#text-decoration-shorthand) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-text-decoration-shorthand#readme) |
4850
| `trigonometric-functions` | `sin()`, `cos()`, `tan()`, `asin()`, `acos()`, `atan()` and `atan2()` functions | [example](https://preset-env.cssdb.org/features/#trigonometric-functions) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-trigonometric-functions#readme) |
4951
| `unset-value` | `unset` Keyword | [example](https://preset-env.cssdb.org/features/#unset-value) | [docs](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-unset-value#readme) |
5052

plugin-packs/postcss-preset-env/package.json

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,52 +27,54 @@
2727
"dist"
2828
],
2929
"dependencies": {
30-
"@csstools/postcss-cascade-layers": "^1.0.4",
31-
"@csstools/postcss-color-function": "^1.1.0",
32-
"@csstools/postcss-font-format-keywords": "^1.0.0",
33-
"@csstools/postcss-hwb-function": "^1.0.1",
34-
"@csstools/postcss-ic-unit": "^1.0.0",
35-
"@csstools/postcss-is-pseudo-class": "^2.0.6",
36-
"@csstools/postcss-normalize-display-values": "^1.0.0",
37-
"@csstools/postcss-oklab-function": "^1.1.0",
30+
"@csstools/postcss-cascade-layers": "^1.0.5",
31+
"@csstools/postcss-color-function": "^1.1.1",
32+
"@csstools/postcss-font-format-keywords": "^1.0.1",
33+
"@csstools/postcss-hwb-function": "^1.0.2",
34+
"@csstools/postcss-ic-unit": "^1.0.1",
35+
"@csstools/postcss-is-pseudo-class": "^2.0.7",
36+
"@csstools/postcss-nested-calc": "^1.0.0",
37+
"@csstools/postcss-normalize-display-values": "^1.0.1",
38+
"@csstools/postcss-oklab-function": "^1.1.1",
3839
"@csstools/postcss-progressive-custom-properties": "^1.3.0",
39-
"@csstools/postcss-stepped-value-functions": "^1.0.0",
40-
"@csstools/postcss-trigonometric-functions": "^1.0.1",
41-
"@csstools/postcss-unset-value": "^1.0.1",
40+
"@csstools/postcss-stepped-value-functions": "^1.0.1",
41+
"@csstools/postcss-text-decoration-shorthand": "^1.0.0",
42+
"@csstools/postcss-trigonometric-functions": "^1.0.2",
43+
"@csstools/postcss-unset-value": "^1.0.2",
4244
"autoprefixer": "^10.4.8",
43-
"browserslist": "^4.21.2",
45+
"browserslist": "^4.21.3",
4446
"css-blank-pseudo": "^3.0.3",
4547
"css-has-pseudo": "^3.0.4",
4648
"css-prefers-color-scheme": "^6.0.3",
47-
"cssdb": "^6.6.3",
48-
"postcss-attribute-case-insensitive": "^5.0.1",
49+
"cssdb": "^7.0.0",
50+
"postcss-attribute-case-insensitive": "^5.0.2",
4951
"postcss-clamp": "^4.1.0",
50-
"postcss-color-functional-notation": "^4.2.3",
52+
"postcss-color-functional-notation": "^4.2.4",
5153
"postcss-color-hex-alpha": "^8.0.4",
52-
"postcss-color-rebeccapurple": "^7.1.0",
54+
"postcss-color-rebeccapurple": "^7.1.1",
5355
"postcss-custom-media": "^8.0.2",
5456
"postcss-custom-properties": "^12.1.8",
5557
"postcss-custom-selectors": "^6.0.3",
56-
"postcss-dir-pseudo-class": "^6.0.4",
57-
"postcss-double-position-gradients": "^3.1.1",
58+
"postcss-dir-pseudo-class": "^6.0.5",
59+
"postcss-double-position-gradients": "^3.1.2",
5860
"postcss-env-function": "^4.0.6",
5961
"postcss-focus-visible": "^6.0.4",
6062
"postcss-focus-within": "^5.0.4",
6163
"postcss-font-variant": "^5.0.0",
62-
"postcss-gap-properties": "^3.0.3",
63-
"postcss-image-set-function": "^4.0.6",
64+
"postcss-gap-properties": "^3.0.5",
65+
"postcss-image-set-function": "^4.0.7",
6466
"postcss-initial": "^4.0.1",
65-
"postcss-lab-function": "^4.2.0",
67+
"postcss-lab-function": "^4.2.1",
6668
"postcss-logical": "^5.0.4",
6769
"postcss-media-minmax": "^5.0.0",
68-
"postcss-nesting": "^10.1.9",
70+
"postcss-nesting": "^10.1.10",
6971
"postcss-opacity-percentage": "^1.1.2",
70-
"postcss-overflow-shorthand": "^3.0.3",
72+
"postcss-overflow-shorthand": "^3.0.4",
7173
"postcss-page-break": "^3.0.4",
72-
"postcss-place": "^7.0.4",
73-
"postcss-pseudo-class-any-link": "^7.1.5",
74+
"postcss-place": "^7.0.5",
75+
"postcss-pseudo-class-any-link": "^7.1.6",
7476
"postcss-replace-overflow-wrap": "^4.0.0",
75-
"postcss-selector-not": "^6.0.0",
77+
"postcss-selector-not": "^6.0.1",
7678
"postcss-value-parser": "^4.2.0"
7779
},
7880
"peerDependencies": {

plugin-packs/postcss-preset-env/scripts/plugins-data.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,15 @@
214214
"packageName": "@csstools/postcss-trigonometric-functions",
215215
"id": "trigonometric-functions",
216216
"importName": "postcssTrigonometricFunctions"
217+
},
218+
{
219+
"packageName": "@csstools/postcss-nested-calc",
220+
"id": "nested-calc",
221+
"importName": "postcssNestedCalc"
222+
},
223+
{
224+
"packageName": "@csstools/postcss-text-decoration-shorthand",
225+
"id": "text-decoration-shorthand",
226+
"importName": "postcssTextDecorationShorthand"
217227
}
218228
]

plugin-packs/postcss-preset-env/src/plugins/plugins-by-id.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import postcssIsPseudoClass from '@csstools/postcss-is-pseudo-class';
2828
import postcssLabFunction from 'postcss-lab-function';
2929
import postcssLogical from 'postcss-logical';
3030
import postcssMediaMinmax from 'postcss-media-minmax';
31+
import postcssNestedCalc from '@csstools/postcss-nested-calc';
3132
import postcssNesting from 'postcss-nesting';
3233
import postcssSelectorNot from 'postcss-selector-not';
3334
import postcssOKLabFunction from '@csstools/postcss-oklab-function';
@@ -39,6 +40,7 @@ import postcssPrefersColorScheme from 'css-prefers-color-scheme';
3940
import postcssColorRebeccapurple from 'postcss-color-rebeccapurple';
4041
import postcssSteppedValueFunctions from '@csstools/postcss-stepped-value-functions';
4142
import postcssFontFamilySystemUI from '../patch/postcss-system-ui-font-family.mjs';
43+
import postcssTextDecorationShorthand from '@csstools/postcss-text-decoration-shorthand';
4244
import postcssTrigonometricFunctions from '@csstools/postcss-trigonometric-functions';
4345
import postcssUnsetValue from '@csstools/postcss-unset-value';
4446

@@ -75,6 +77,7 @@ export const pluginsById = new Map(
7577
['lab-function', postcssLabFunction],
7678
['logical-properties-and-values', postcssLogical],
7779
['media-query-ranges', postcssMediaMinmax],
80+
['nested-calc', postcssNestedCalc],
7881
['nesting-rules', postcssNesting],
7982
['not-pseudo-class', postcssSelectorNot],
8083
['oklab-function', postcssOKLabFunction],
@@ -86,6 +89,7 @@ export const pluginsById = new Map(
8689
['rebeccapurple-color', postcssColorRebeccapurple],
8790
['stepped-value-functions', postcssSteppedValueFunctions],
8891
['system-ui-font-family', postcssFontFamilySystemUI],
92+
['text-decoration-shorthand', postcssTextDecorationShorthand],
8993
['trigonometric-functions', postcssTrigonometricFunctions],
9094
['unset-value', postcssUnsetValue],
9195
],

plugin-packs/postcss-preset-env/src/plugins/plugins-data.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,14 @@ export default [
215215
'id': 'trigonometric-functions',
216216
'importName': 'postcssTrigonometricFunctions',
217217
},
218+
{
219+
'packageName': '@csstools/postcss-nested-calc',
220+
'id': 'nested-calc',
221+
'importName': 'postcssNestedCalc',
222+
},
223+
{
224+
'packageName': '@csstools/postcss-text-decoration-shorthand',
225+
'id': 'text-decoration-shorthand',
226+
'importName': 'postcssTextDecorationShorthand',
227+
},
218228
];

plugin-packs/postcss-preset-env/test/basic.autoprefixer.expect.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,14 @@
439439
display: ruby-text flow;
440440
}
441441

442+
[dir="ltr"] .logical-float {
443+
float: left;
444+
}
445+
446+
[dir="rtl"] .logical-float {
447+
float: right;
448+
}
449+
442450
.color-function {
443451
prop-1: rgb(0,132,94);
444452
prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)';
@@ -592,3 +600,14 @@
592600
background: red;
593601
}
594602
}
603+
604+
.nested-calc {
605+
order: calc(1 * (8 / 3 + (5 * 10)));
606+
order: calc(1 * calc(8 / 3 + calc(5 * 10)));
607+
}
608+
609+
.text-decoration-shorthand {
610+
text-decoration: overline;
611+
text-decoration: overline wavy pink;
612+
text-decoration-thickness: 3px;
613+
}

plugin-packs/postcss-preset-env/test/basic.autoprefixer.false.expect.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,14 @@
439439
display: ruby-text flow;
440440
}
441441

442+
[dir="ltr"] .logical-float {
443+
float: left;
444+
}
445+
446+
[dir="rtl"] .logical-float {
447+
float: right;
448+
}
449+
442450
.color-function {
443451
prop-1: rgb(0,132,94);
444452
prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)';
@@ -592,3 +600,14 @@
592600
background: red;
593601
}
594602
}
603+
604+
.nested-calc {
605+
order: calc(1 * (8 / 3 + (5 * 10)));
606+
order: calc(1 * calc(8 / 3 + calc(5 * 10)));
607+
}
608+
609+
.text-decoration-shorthand {
610+
text-decoration: overline;
611+
text-decoration: overline wavy pink;
612+
text-decoration-thickness: 3px;
613+
}

plugin-packs/postcss-preset-env/test/basic.ch38.expect.css

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,11 @@
1818
}
1919

2020
.test-image-set-function {
21-
background-image: url(img/test.png);
2221
background-image: -webkit-image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
2322
background-image: image-set(url(img/test.png) 1x, url(img/test-2x.png) 2x);
2423
order: 2;
2524
}
2625

27-
@media (min-resolution: 192dpi) {
28-
29-
.test-image-set-function {
30-
background-image: url(img/test-2x.png);
31-
}
32-
}
33-
3426
[dir="ltr"] .test-logical-properties-and-values {
3527
margin: 1px 4px 3px 2px;
3628
}
@@ -359,6 +351,14 @@
359351
display: ruby-text flow;
360352
}
361353

354+
[dir="ltr"] .logical-float {
355+
float: left;
356+
}
357+
358+
[dir="rtl"] .logical-float {
359+
float: right;
360+
}
361+
362362
.color-function {
363363
prop-1: rgb(0,132,94);
364364
prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)';
@@ -511,3 +511,15 @@
511511
background: red;
512512
}
513513
}
514+
515+
.nested-calc {
516+
order: calc(1 * (8 / 3 + (5 * 10)));
517+
order: calc(1 * calc(8 / 3 + calc(5 * 10)));
518+
}
519+
520+
.text-decoration-shorthand {
521+
text-decoration: overline;
522+
-webkit-text-decoration: overline wavy pink;
523+
text-decoration: overline wavy pink;
524+
text-decoration-thickness: 3px;
525+
}

plugin-packs/postcss-preset-env/test/basic.ch88-ff78-saf10.expect.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,14 @@ h1.test-custom-selectors,h2.test-custom-selectors,h3.test-custom-selectors,h4.te
358358
display: ruby-text flow;
359359
}
360360

361+
[dir="ltr"] .logical-float {
362+
float: left;
363+
}
364+
365+
[dir="rtl"] .logical-float {
366+
float: right;
367+
}
368+
361369
.color-function {
362370
prop-1: rgb(0,132,94);
363371
prop-2: 'color(display-p3 0.02472 0.01150 0.00574 / 1)';
@@ -505,3 +513,15 @@ h1.test-custom-selectors,h2.test-custom-selectors,h3.test-custom-selectors,h4.te
505513
[data-view-size=m] .view {
506514
background: red;
507515
}
516+
517+
.nested-calc {
518+
order: calc(1 * (8 / 3 + (5 * 10)));
519+
order: calc(1 * calc(8 / 3 + calc(5 * 10)));
520+
}
521+
522+
.text-decoration-shorthand {
523+
text-decoration: overline;
524+
-webkit-text-decoration: overline wavy pink;
525+
text-decoration: overline wavy pink;
526+
text-decoration-thickness: 3px;
527+
}

0 commit comments

Comments
 (0)