A fun resource for helping learners get creative with CSS.
- node
npm install -g webpack
npm install -g webpack-dev-server
npm install
npm run server
Will start a live-reloading local server at http://localhost:8080/webpack-dev-server/. If you happen to forget this URL, you can run npm run open
to open it in your browser.
npm build
Will build output to bundle.js
- edit styles.js with a CSS property name (camelcased instead of dashes) and an array of example values for that property. You can set up other styles for each example using the
defaultStyles
property.
- Create a new component in ./src/components
- Imoprt your component into index.js
- Add a new
<Route>
component toroutes
in index.js, withhandler
property set to your component - Import your component to main.js and add a new
<link>
component tolinks
Click the "download zip" button, extract, and open index.html in your browser.