Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philipwalton/responsive-components
A modern approach to styling elements based on the size of their container
https://github.com/philipwalton/responsive-components
Last synced: 28 days ago
JSON representation
A modern approach to styling elements based on the size of their container
- Host: GitHub
- URL: https://github.com/philipwalton/responsive-components
- Owner: philipwalton
- License: apache-2.0
- Created: 2018-02-04T06:03:36.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2024-06-11T18:22:09.000Z (5 months ago)
- Last Synced: 2024-10-05T12:34:55.483Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://philipwalton.github.io/responsive-components/
- Size: 1.76 MB
- Stars: 584
- Watchers: 23
- Forks: 42
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - responsive-components
README
# Responsive Components
A working implementation of the strategy outlined in the article [Responsive Components: a Solution to the Container Queries Problem](https://philipwalton.com/articles/responsive-components-a-solution-to-the-container-queries-problem/)
[View Site](https://philipwalton.github.io/responsive-components/)
## Viewing the Site Locally
The Responsive Components site can be built with [Node.js](http://nodejs.org/). If you have Node.js installed on your system, you can run the following commands to build and serve a local version.
```sh
# Clone the git repository and cd into the cloned directory.
git clone https://github.com/philipwalton/responsive-components.git
cd responsive-components# Install the dependencies
npm install# Build and serve the site at http://localhost:8080
npm start
```This starts up a local server on port 8080. To view the site in your browser, navigate to [http://localhost:8080](http://localhost:8080).
In addition to building the site and serving it locally, this will also listen for any changes and rebuild the site as needed. This allows you to play around with the code, refresh the browser, and see your changes instantly.