styled-bootstrap-grid
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "styled-bootstrap-grid", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "bootstrap grid system using styled components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -19,4 +19,5 @@ # styled-bootstrap-grid | ||
## Prerequisites | ||
Bootstrap is developed mobile first, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your <head>. | ||
>> Bootstrap is developed mobile first, a strategy in which we optimize code for mobile devices first and then scale up components as necessary using CSS media queries. To ensure proper rendering and touch zooming for all devices, add the responsive viewport meta tag to your `<head>`. *from [Bootstrap documentation](https://v4-alpha.getbootstrap.com/getting-started/introduction/#responsive-meta-tag)* | ||
```html | ||
@@ -26,4 +27,29 @@ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
You also must include these css lines in your `head` to make it work : | ||
You also must inject the bootstrap base CSS in your application root file, like this. | ||
```javascript | ||
// app.js | ||
import { injectLayoutBaseCSS } from 'styled-bootstrap-grid'; | ||
injectLayoutBaseCSS(); | ||
``` | ||
You also can inject your own css like this : | ||
```javascript | ||
const customCSS = ` | ||
body { | ||
// whatever | ||
} | ||
`; | ||
injectLayoutBaseCSS(customCSS); | ||
``` | ||
Basicaly, `injectLayoutBaseCSS` takes a string in param, and append the default bootstrap layout base CSS with this string with it. | ||
the defaut bootstrap layout CSS is : | ||
```css | ||
@@ -47,2 +73,3 @@ @-ms-viewport { | ||
``` | ||
## Basics | ||
@@ -54,3 +81,3 @@ | ||
export default (props) => | ||
export default (props) => | ||
<Whatever> | ||
@@ -147,2 +174,1 @@ <Container> | ||
* find a way to inject `<meta />` head element. | ||
* find a way to inject the general css. |
@@ -5,1 +5,2 @@ export { default as media } from './styled/media'; | ||
export { default as Col } from './Col'; | ||
export { default as injectLayoutBaseCSS } from './injectLayoutBaseCSS'; |
Sorry, the diff of this file is not supported yet
39172
27
937
170