Skip to content

Commit

Permalink
Merge pull request #649 from no-chris/configure-postcss
Browse files Browse the repository at this point in the history
Configure postcss
  • Loading branch information
no-chris authored Mar 4, 2024
2 parents 6fc33b2 + d468f4e commit e4a075a
Show file tree
Hide file tree
Showing 8 changed files with 905 additions and 5 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
"eslint-plugin-react-hooks": "^4.6.0",
"generate-changelog": "^1.8.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-localstorage-mock": "^2.4.26",
"jest-text-transformer": "^1.0.4",
"lerna": "^8.0.2",
"long": "^5.2.3",
"postcss-preset-env": "^9.4.0",
"prettier": "^3.2.4",
"regenerator-runtime": "^0.14.1",
"size-limit": "^11.0.2",
Expand All @@ -47,8 +50,6 @@
"test": "jest"
},
"dependencies": {
"jest-environment-jsdom": "^29.7.0",
"jest-text-transformer": "^1.0.4"
},
"workspaces": [
"packages/*"
Expand Down
9 changes: 9 additions & 0 deletions packages/chord-chart-studio/css/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:root {
--space-xxs: 4px;
--space-xs: 8px;
--space-s: 12px;
--space-m: 16px;
--space-l: 24px;
--space-xl: 32px;
--space-xxl: 48px;
}
18 changes: 18 additions & 0 deletions packages/chord-chart-studio/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* eslint-env node */
const postcssPresetEnv = require('postcss-preset-env');

module.exports = {
plugins: [
postcssPresetEnv({
stage: 3,
features: {
'nesting-rules': [
'auto',
{
noIsPseudoSelector: false,
},
],
},
}),
],
};
1 change: 1 addition & 0 deletions packages/chord-chart-studio/src/app.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '../css/global.css';
import '../scss/styles.scss';

import { createStore } from './state/store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React from 'react';
export default function Button({ children, onClick }) {
return (
<div className={styles.button} onClick={onClick}>
{children}
<div className={styles.buttonContent}>{children}</div>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
.button {
font-weight: bold;
background-color: red;

.buttonContent {
background-color: blueviolet;
padding: var(--space-xxl);
}
}
Loading

0 comments on commit e4a075a

Please sign in to comment.