Skip to content

Commit e328996

Browse files
authored
logical-resize (#792)
* logical-resize * rebuild
1 parent ed0119f commit e328996

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1005
-48
lines changed

.github/ISSUE_TEMPLATE/css-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ body:
8888
- PostCSS Lab Function
8989
- PostCSS Logical
9090
- PostCSS Logical Float and Clear
91+
- PostCSS Logical Resize
9192
- PostCSS Logical Viewport Units
9293
- PostCSS Media Queries Aspect-Ratio Number Values
9394
- PostCSS Media Query Ranges

.github/ISSUE_TEMPLATE/plugin-issue.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ body:
9090
- PostCSS Lab Function
9191
- PostCSS Logical
9292
- PostCSS Logical Float and Clear
93+
- PostCSS Logical Resize
9394
- PostCSS Logical Viewport Units
9495
- PostCSS Media Queries Aspect-Ratio Number Values
9596
- PostCSS Media Query Ranges

.github/labeler.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@
140140
- plugins/postcss-logical-float-and-clear/**
141141
- experimental/postcss-logical-float-and-clear/**
142142

143+
"plugins/postcss-logical-resize":
144+
- plugins/postcss-logical-resize/**
145+
- experimental/postcss-logical-resize/**
146+
143147
"plugins/postcss-logical-viewport-units":
144148
- plugins/postcss-logical-viewport-units/**
145149
- experimental/postcss-logical-viewport-units/**

package-lock.json

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

plugins/postcss-logical-float-and-clear/INSTALL.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
- [PostCSS CLI](#postcss-cli)
77
- [PostCSS Load Config](#postcss-load-config)
88
- [Webpack](#webpack)
9-
- [Create React App](#create-react-app)
109
- [Next.js](#nextjs)
1110
- [Gulp](#gulp)
1211
- [Grunt](#grunt)
@@ -142,28 +141,6 @@ module.exports = {
142141
};
143142
```
144143

145-
## Create React App
146-
147-
Add [React App Rewired] and [React App Rewire PostCSS] to your project:
148-
149-
```bash
150-
npm install react-app-rewired react-app-rewire-postcss @csstools/postcss-logical-float-and-clear --save-dev
151-
```
152-
153-
Use [React App Rewire PostCSS] and [PostCSS Logical Float And Clear] in your
154-
`config-overrides.js` file:
155-
156-
```js
157-
const reactAppRewirePostcss = require('react-app-rewire-postcss');
158-
const postcssLogicalFloatAndClear = require('@csstools/postcss-logical-float-and-clear');
159-
160-
module.exports = config => reactAppRewirePostcss(config, {
161-
plugins: () => [
162-
postcssLogicalFloatAndClear(/* pluginOptions */)
163-
]
164-
});
165-
```
166-
167144
## Next.js
168145

169146
Read the instructions on how to [customize the PostCSS configuration in Next.js](https://nextjs.org/docs/advanced-features/customizing-postcss-config)
@@ -255,6 +232,4 @@ grunt.initConfig({
255232
[PostCSS CLI]: https://github.com/postcss/postcss-cli
256233
[PostCSS Loader]: https://github.com/postcss/postcss-loader
257234
[PostCSS Logical Float And Clear]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-float-and-clear
258-
[React App Rewire PostCSS]: https://github.com/csstools/react-app-rewire-postcss
259-
[React App Rewired]: https://github.com/timarney/react-app-rewired
260235
[Next.js]: https://nextjs.org

plugins/postcss-logical-float-and-clear/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ instructions for:
4444
- [PostCSS CLI](INSTALL.md#postcss-cli)
4545
- [PostCSS Load Config](INSTALL.md#postcss-load-config)
4646
- [Webpack](INSTALL.md#webpack)
47-
- [Create React App](INSTALL.md#create-react-app)
4847
- [Next.js](INSTALL.md#nextjs)
4948
- [Gulp](INSTALL.md#gulp)
5049
- [Grunt](INSTALL.md#grunt)
@@ -84,7 +83,7 @@ Each direction must be one of the following:
8483
- `left-to-right`
8584
- `right-to-left`
8685

87-
Please do not that transformations won't run if `inlineDirection` becomes vertical.
86+
Please do note that transformations won't run if `inlineDirection` becomes vertical.
8887

8988
[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
9089
[css-url]: https://cssdb.org/#float-clear-logical-values

plugins/postcss-logical-float-and-clear/package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,25 @@
4949
"lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
5050
"lint:package-json": "node ../../.github/bin/format-package-json.mjs",
5151
"prepublishOnly": "npm run clean && npm run build && npm run test",
52-
"stryker": "stryker run --logLevel error",
5352
"test": "node .tape.mjs && npm run test:exports",
5453
"test:exports": "node ./test/_import.mjs && node ./test/_require.cjs",
5554
"test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
5655
},
56+
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-float-and-clear#readme",
5757
"repository": {
5858
"type": "git",
5959
"url": "https://github.com/csstools/postcss-plugins.git",
6060
"directory": "plugins/postcss-logical-float-and-clear"
6161
},
62+
"bugs": "https://github.com/csstools/postcss-plugins/issues",
6263
"keywords": [
64+
"block",
65+
"clear",
66+
"css",
67+
"float",
68+
"inline",
69+
"logical",
70+
"postcss",
6371
"postcss-plugin"
6472
],
6573
"csstools": {
@@ -70,7 +78,5 @@
7078
},
7179
"volta": {
7280
"extends": "../../package.json"
73-
},
74-
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-float-and-clear#readme",
75-
"bugs": "https://github.com/csstools/postcss-plugins/issues"
81+
}
7682
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
package-lock.json
3+
yarn.lock
4+
*.result.css
5+
*.result.css.map
6+
*.result.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.8.0
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import postcssTape from '../../packages/postcss-tape/dist/index.mjs';
2+
import plugin from '@csstools/postcss-logical-resize';
3+
4+
postcssTape(plugin)({
5+
'basic': {
6+
message: 'basic test with default setting',
7+
},
8+
'basic:rtl': {
9+
message: 'basic test with rtl',
10+
options: {
11+
inlineDirection: 'right-to-left'
12+
},
13+
},
14+
'basic:bt': {
15+
message: 'basic test with bt',
16+
options: {
17+
blockDirection: 'bottom-to-top'
18+
},
19+
},
20+
'basic:rtl-and-bt': {
21+
message: 'basic test with rtl and bt',
22+
options: {
23+
blockDirection: 'bottom-to-top',
24+
inlineDirection: 'right-to-left'
25+
},
26+
},
27+
'basic:chinese': {
28+
message: 'basic test with rtl and bt',
29+
options: {
30+
blockDirection: 'right-to-left',
31+
inlineDirection: 'top-to-bottom'
32+
},
33+
},
34+
'examples/example': {
35+
message: 'minimal example',
36+
},
37+
'examples/example:chinese': {
38+
message: 'minimal example',
39+
options: {
40+
blockDirection: 'right-to-left',
41+
inlineDirection: 'top-to-bottom'
42+
}
43+
},
44+
});

0 commit comments

Comments
 (0)