-
-
Notifications
You must be signed in to change notification settings - Fork 78
postcss-global-data : set postcss 'from' option #846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
romainmenke
merged 1 commit into
main
from
postcss-global-data-set--set-from-option--inventive-quoll-e4ef9b210d
Feb 9, 2023
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
e2e/interop/custom-media--design-tokens--global-data/.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v18.8.0 |
5 changes: 5 additions & 0 deletions
5
e2e/interop/custom-media--design-tokens--global-data/expect.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@media (min-width: 768px) { | ||
body { | ||
color: green; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
e2e/interop/custom-media--design-tokens--global-data/media-queries.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@design-tokens url('./tokens.json') format('style-dictionary3'); | ||
|
||
@custom-media --tablet (min-width: design-token('viewport-tablet' to px)); |
19 changes: 19 additions & 0 deletions
19
e2e/interop/custom-media--design-tokens--global-data/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "@csstools/interop--custom-media--design-tokens--global-data", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Can you use custom-media, design-tokens and global-data together?", | ||
"scripts": { | ||
"build": "postcss style.css -o ./result.css", | ||
"test": "node ./test.mjs" | ||
}, | ||
"devDependencies": { | ||
"@csstools/postcss-design-tokens": "file:../../../plugins/postcss-design-tokens", | ||
"@csstools/postcss-global-data": "file:../../../plugins/postcss-global-data", | ||
"postcss-cli": "^10.1.0", | ||
"postcss-custom-media": "file:../../../plugins/postcss-custom-media" | ||
}, | ||
"volta": { | ||
"extends": "../../package.json" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
e2e/interop/custom-media--design-tokens--global-data/postcss.config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default () => ({ | ||
map: false, | ||
plugins: { | ||
'@csstools/postcss-global-data': { | ||
files: [ | ||
'./media-queries.css', | ||
], | ||
}, | ||
'@csstools/postcss-design-tokens': {}, | ||
'postcss-custom-media': {}, | ||
}, | ||
}); |
5 changes: 5 additions & 0 deletions
5
e2e/interop/custom-media--design-tokens--global-data/result.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@media (min-width: 768px) { | ||
body { | ||
color: green; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
e2e/interop/custom-media--design-tokens--global-data/style.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@media (--tablet) { | ||
body { | ||
color: green; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
e2e/interop/custom-media--design-tokens--global-data/test.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import assert from 'assert'; | ||
import fs from 'fs/promises'; | ||
|
||
const result = await fs.readFile('./result.css'); | ||
const expect = await fs.readFile('./expect.css'); | ||
|
||
assert.equal(result.toString(), expect.toString()); |
5 changes: 5 additions & 0 deletions
5
e2e/interop/custom-media--design-tokens--global-data/tokens.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"viewport-tablet": { | ||
"value": 768 | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.