Type | How to Use | Size | Comes after of | Following options | Can set css after? |
---|---|---|---|---|---|
xs | .xs() |
0px | Media Feature |
Logical Operator |
✔ |
sm | .sm() |
576px | Media Feature |
Logical Operator |
✔ |
md | .md() |
768px | Media Feature |
Logical Operator |
✔ |
lg | .lg() |
992px | Media Feature |
Logical Operator |
✔ |
xl | .xl() |
1200px | Media Feature |
Logical Operator |
✔ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrapper = styled.div` | |
background-color: #1B9CE2; | |
color: #FFF; | |
font-size: 16px; | |
SuperQuery().minWidth('360px').and().maxWidth('1024px').css` | |
content: 'this is awesome!' | |
` | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrapper = styled.div` | |
background-color: #1B9CE2; | |
color: #FFF; | |
font-size: 16px; | |
SuperQuery().minWidth().sm().and().maxWidth().lg().css` | |
content: 'this is even more awesome!' | |
` | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrapper = styled.div` | |
background-color: #1B9CE2; | |
color: #FFF; | |
font-size: 16px; | |
SuperQuery().maxWidth().md().and().landscape().css` | |
content: 'Yep! Your device is on landscape mode!' | |
` | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wrapper = styled.div` | |
background-color: #1B9CE2; | |
color: #FFF; | |
font-size: 16px; | |
SuperQuery() | |
.screen() | |
.and() | |
.deviceAspectRatio('16/9') | |
.or() | |
.screen() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from 'styled-components'; | |
import SuperQuery from '@themgoncalves/super-query'; | |
const Title = styled.h1` | |
color: #666; | |
font-size: 16px; | |
${SuperQuery().minWidth().lg().css` | |
font-size: 20px; | |
`}; | |
${SuperQuery().minWidth().lg().and().landscape().css` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first we need to import the `configureBreakpoints` function | |
import { configureBreakpoints } from '@themgoncalves/super-query'; | |
// here is an example of a custom breakpoint | |
const customBreakpoints = { | |
extraSmall: 360, | |
small: 640, | |
medium: 960, | |
large: 1024, | |
extraLarge: 1200, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styled from 'styled-components'; | |
import SuperQuery, { configureBreakpoints } from '@themgoncalves/super-query'; | |
const customBreakpoints = { | |
extraSmall: 360, | |
small: 640, | |
medium: 960, | |
large: 1024, | |
extraLarge: 1200, | |
superExtraLarge: 1600, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const webpack = require('webpack'); | |
const path = require('path'); | |
const ReactLoadableSSRAddon = require('react-loadable-ssr-addon'); | |
module.exports = { | |
target: 'web', | |
entry: { | |
index: './source/client.jsx', | |
}, | |
devtool: 'cheap-module-eval-source-map', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Loadable from 'react-loadable'; | |
const TitleAsync = Loadable({ | |
loader: () => import(/* webpackChunkName: "title" */'./title'), | |
loading() { | |
return <div>Loading...</div> | |
} | |
}); |
OlderNewer