
Responsive Boilerplate
A powerful, accessible, developer friendly, framework for building responsive websites
Responsive Boilerplate is the developers' framework.
Other frameworks are too design opinionated and heavy. They're great for prototyping but every time you start a real, front-facing, project with them you have to overwrite lots of designer styles that do nothing to add to the functionality of the website. That costs developers time and money.
Responsive Boilerplate has been built with that in mind. It is the result of thousands of hours of real, client driven web development and testing; specifically developed to be as lightweight as possible to prevent the need to undo styles set by the framework itself and allow developers to write efficient code and lower costs.
Responsive Boilerplate is tiny. The combined output CSS and JavaScript is only 20.3kb minified and gzipped but there is a lot of functionality built into the framework with touch, right-to-left language, and accessibility support.
Browser support covers all evergreen browsers.
Downloading Responsive Boilerplate
Several options are available for downloading Responsive:
- Download the latest release.
- Download the latest release source.
- Clone the repo:
git clone https://github.com/ResponsiveBP/Responsive.git
. - Install with NPM:
npm install responsive-bp
.
Documentation
Responsives' documentation, included in the gh-pages repo. It is built with Jekyll and publicly hosted on GitHub Pages at http://responsivebp.com. The docs may also be run locally.
- If necessary, install Jekyll (requires v2.5.2).
- If you are running Windows please read this unofficial guide to get Jekyll up and running without problems.
- From the root
/Responsive
directory, runjekyll serve
in the command line.
- Open http://localhost:4000 in your browser to view the compiled docs.
Learn more about using Jekyll by reading its documentation.
Contributing
Contribution is most welcome, that's the whole idea! Together as a community we can build a boilerplate for building responsive sites that will ensure that high standards can be delivered across all devices.
Please adhere to existing JavaScript and Sass styles though when submitting code and ensure that you test thoroughly on multiple devices.
Please take a moment to review the guidelines for contributing.
Building the Sass and JavaScript
The build process for Responsive is powered by Webpack. To build Responsive you will need to first install the required plugins using the following commands from the root /Responsive
directory:
npm install
to install the necessary build dependencies based on the contents of thepackage.json
file.
If you are adding new functionality to the build process use:
npm install {your_new_build_dependency} --save-dev
There are three types of build available:
npm run build
Compiles the framework to the dist folder.npm run dev
For development purposes. Compiles the framework to the dist folder and watches for further changes
Authors
James South @james_m_south and the Responsive contributors.
Community
Follow @responsivebp on Twitter. Discuss Responsive on Gitter.
Copyright and license
Copyright 2013 James Jackson-South under the MIT license.
Attaching modal event handler after initial load
I've got a modal that is used to show a group of pictures for real estate listings. Works great on the list if it's used after the initial page load. If the user runs another search via ajax the list is replaced by the new results. At that point the modal no longer works and it just opens a new page when the link is clicked on one of the listings. This appears to happen because the new list no longer has the modal event handler attached. How do I get RBP to attach to the links after an ajax call like this?
v4 Feature List
This issue serves as a location to discuss the feature and testing matrix for v4 of Responsive. Anything agreed below will be added here.
CSS/Sass
JavaScript
UMD support? Inherited widgets?
[Question] Breakpoints
Hi, Love this framework by the way, great alternative to TwitterBS & Foundation, without the bloat :)
Just one question, the minimum breakpoint for the grid is set to
Up to 48em (768px at 16px/1em)
usingcol-xs-XX
for example, is there any chance we could get 1 or 2 more BPs before this for smaller devices?For example, for devices smaller than
768px
in width i.e smaller tablets or landscape smartphones (iPhone5 for example), I may want to keep a 2 column layout and only go to a single column layout when the device width is320px
, whereas at the moment, it's a single column layout for ALL devices up to768px
.Maybe set another BP at
Up to 37.5em (600px at 16px/1em)
to catch landscape iPhones & vertical small tablets, and again atUp to 30em (480px at 16px/1em)
to catch all mobile devices – maybe using classes ofcol-xxs-XX
andcol-mob-XX
?I hope that all makes sense. Just feel that having a few extra options below
768px
would be helpful :)PS. If i've missed something in the docs that achieves the above, I apologise in advance.
Publish to npm
https://www.npmjs.com/package/responsive doesn't exist (or is my search fu bad?)
Would make it easier to use with webpack / sass-loader
Great project btw :)
Question: Modal - how to close with jQuery?
Hi!
I have one, probably simple question. Unfortunately I can't figure it out ;)
What is the command to close the modal with jquery (called from a target page)? The action should be pretty much the same as clicking the 'x' symbol.
And an example :) There are to pages: INDEX.php CONTENT.php
Index has a link that opens content in a modal.
How to close the modal
I'll be really grateful for help!
Lazy load carousel images
It would be great if there was a possibility to prevent the browser from loading all carousel images on first pass of the document. This could be done by referencing the url of the image only in "data-src" attribute to prevent the request on the server and delay the loading of images.
Carousel markup would look like this:
This enhancement would make ResponsiveBP carousel superior to other carousel scripts which don't support lazy loading and bloat the page size.
Modal race condition
Sometimes if you hide and show modal window. Modal windows stops working until page restart.
Also if you run code to show modal while modal is shown, the modal window won't disappear.
Modal title when loading manually
When loading manually how can I get the modal title to be taken from the link? It doesn't pick up the attribute data-modal-title if I provide it. In my case since the modal is showing photo's for a single property I'd like to display the MLS number and price for example in the title when the modal opens.
Feature Request: Execution Order of MediaQueries
Have just switched over from a Bootstrap project to a private project I want to use ResponsiveBP in. I'm finding I'm having to write far more HTML with ResponsiveBP because it appears to require a discrete definition of col-xxx-xxx for each size of a section. So to have a column be 10 wide from xxs to up s then switch to 5 wide at m and above, I'm having to write "col-xxs10 col-xs-10 col-s-10 col-m-5 col-l-5" instead of simply "col-xxs10 col-m-5" which I think is more logical (thinking of mobile first) and certainly less bloat code-wise. Not to mention bandwidth and dev time. Could it be implemented or is it too hard/not in keeping with project aims?
Invalid Markup
I really like this little boilerplate, it beats the 'cater for everything' approach of the other larger ones, but I spotted this earlier in the lightbox examples:
Unfortunately, this is invalid markup for anyone using xhtml5. It won't validate, and any application that uses XML to produce html5 markup would throw a fatal error with this.
Would there be any other way to tackle this?
html5shiv issue when installing with bower
Hi everyone, I'm having this issue when installing latest version with bower:
Do you guys know how to avoid this dependency issue ?
Bump json5 from 2.1.3 to 2.2.3
Bumps json5 from 2.1.3 to 2.2.3.
Release notes
Sourced from json5's releases.
Changelog
Sourced from json5's changelog.
Commits
c3a7524
2.2.394fd06d
docs: update CHANGELOG for v2.2.33b8cebf
docs(security): use GitHub security advisoriesf0fd9e1
docs: publish a security policy6a91a05
docs(template): bug -> bug report14f8cb1
2.2.210cc7ca
docs: update CHANGELOG for v2.2.27774c10
fix: add proto to objects and arraysedde30a
Readme: slight tweak to intro97286f8
Improve example in readmeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
Bump is-svg and postcss-svgo
Removes is-svg. It's no longer used after updating ancestor dependency postcss-svgo. These dependencies need to be updated together.
Removes
is-svg
Updates
postcss-svgo
from 4.0.2 to 4.0.3Release notes
Sourced from postcss-svgo's releases.
Commits
dd457b2
chore(release): 4.0.39a70605
fix(postcss-merge-longhand): not mangle border output (#555)c4f2e59
fix: incorrect merging of border declarations (#551) (#552)ed5c54e
Remove v4 notice on homepageDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
Bump minimatch from 3.0.4 to 3.0.8
Bumps minimatch from 3.0.4 to 3.0.8.
Commits
782c264
3.0.86ade2da
fix: trim patterna6f52b0
3.0.7e4cd434
fix: treat nocase:true as always having magice6bbe1c
publishConfig for 3.05b7cd33
3.0.620b4b56
[fix] revert all breaking syntax changes2ff0388
document, expose, and test 'partial:true' option5dbd6a7
ci: tests and makeworkdbda065
full test coverage, adding tests, deleting dead codeDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labels
will set the current labels as the default for future PRs for this repo and language@dependabot use these reviewers
will set the current reviewers as the default for future PRs for this repo and language@dependabot use these assignees
will set the current assignees as the default for future PRs for this repo and language@dependabot use this milestone
will set the current milestone as the default for future PRs for this repo and languageYou can disable automated security fix PRs for this repo from the Security Alerts page.
Dark Mode
Is there a way to setup responsive bp's colors to be an inverted dark mode set of colors easily or would it require major updates to the source and rebuilding the css?
modal-group + mobile-target inconsistent in Google Chrome
In Google Chrome: If I add data-modal-mobile-target="..." to grouped images, with the first call, (on a mobile device) it opens the lightbox. Then pressing the arrow, it shows the mobile target (so just the picture). In Firefox it works as expected ans opens just the image and then one has to go back.
Also in Chrome I get a warning in the console: [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. I think its related, but my javascript knowledge is limited and I was not successful fixing it...
No default jsDelivr CDN file set
This package doesn't have a default file set. You can set it via
jsdelivr
,browser
, ormain
field inpackage.json
Not sure what's involved with this but i guess if you can create a default file set you can have automatic CDN with jsDelivr