aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMegan Pearson <megan.e.pearson@gmail.com>2018-10-19 21:36:38 +0800
committerMegan Pearson <megan.e.pearson@gmail.com>2018-10-19 21:36:38 +0800
commit736e1717fa4e59594e76694f7f6cc9dd0b45f1a9 (patch)
treeac9a1879b9bbdda2bbaa6ea54094888b7e7b9b07
parent45a24738b585d568c765b641a94e9bbf941a8fd7 (diff)
parentd6ac1a4f782c55407760d4502325b6aa2cf3730c (diff)
downloaddexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar.gz
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar.bz2
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar.lz
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar.xz
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.tar.zst
dexon-sol-tools-736e1717fa4e59594e76694f7f6cc9dd0b45f1a9.zip
Merge branch 'feature/responsive' into feature/variables
-rw-r--r--packages/dev-tools-pages/ts/components/Footer.tsx40
-rw-r--r--packages/dev-tools-pages/ts/components/Header.tsx6
-rw-r--r--packages/dev-tools-pages/ts/components/Trace.tsx41
-rw-r--r--packages/dev-tools-pages/ts/components/Typography.tsx5
-rw-r--r--packages/dev-tools-pages/ts/globalStyles.tsx4
5 files changed, 89 insertions, 7 deletions
diff --git a/packages/dev-tools-pages/ts/components/Footer.tsx b/packages/dev-tools-pages/ts/components/Footer.tsx
index 82b2de1a3..15e6a5b86 100644
--- a/packages/dev-tools-pages/ts/components/Footer.tsx
+++ b/packages/dev-tools-pages/ts/components/Footer.tsx
@@ -4,6 +4,7 @@ import styled from 'styled-components';
import { Alpha, Beta } from './Typography';
import { withContext, Props } from './withContext';
import Container from './Container';
+import { media } from '../variables';
import MainIcon from 'ts/icons/logos/0x.svg';
import compiler from 'ts/context/compiler';
@@ -23,7 +24,7 @@ function Footer(props: Props) {
<Alpha>Other tools by 0x</Alpha>
<List>
{tools.map(({ title, subtitle, icon }) => (
- <ListItem as="li" key={title}>
+ <ListItem key={title}>
<Icon as={icon} />
<div>
<Beta>{title}</Beta>
@@ -49,21 +50,38 @@ const StyledFooter = styled.footer`
background-color: ${(props: { background: string }) => props.background};
padding-top: 6.25rem;
padding-bottom: 5.4375rem;
+
+ ${media.small`padding-top: 2.5rem;`};
`;
const Top = styled.div`
display: flex;
justify-content: space-between;
margin-bottom: 9.375rem;
+
+ ${media.small`
+ display: block;
+ margin-bottom: 5.3125rem;
+ `};
+
+ ${Alpha} {
+ ${media.small`margin-bottom: 3.8125rem;`};
+ }
+`;
+
+const Icon = styled.div`
+ margin-right: 1.3125rem;
+
+ ${media.small`margin-right: 0.9375rem`};
`;
const Media = styled.div`
display: flex;
align-items: center;
-`;
-const Icon = styled.div`
- margin-right: 1.3125rem;
+ ${Icon} {
+ align-self: flex-start;
+ }
`;
const List = styled.ul`
@@ -73,14 +91,26 @@ const List = styled.ul`
flex-direction: row;
margin: 0;
padding: 0;
+
+ ${media.small`
+ display: block;
+ width: 100%;
+ `};
`;
-const ListItem = styled(Media)`
+const ListItem = styled.li`
+ display: flex;
+ align-items: center;
flex-basis: 50%;
margin-bottom: 3.3125rem;
+
:nth-last-of-type(-n + 2) {
margin-bottom: 0;
+
+ ${media.small`margin-bottom: 1.875rem`};
}
+
+ ${media.small`margin-bottom: 1.875rem`};
`;
const Small = styled.small`
diff --git a/packages/dev-tools-pages/ts/components/Header.tsx b/packages/dev-tools-pages/ts/components/Header.tsx
index dca562421..aeefae3cc 100644
--- a/packages/dev-tools-pages/ts/components/Header.tsx
+++ b/packages/dev-tools-pages/ts/components/Header.tsx
@@ -5,6 +5,8 @@ import { withContext, Props } from './withContext';
import Container from './Container';
import { Small } from './Typography';
+import { media } from '../variables';
+
function Header(props: Props) {
const { icon, title, colors } = props;
@@ -36,6 +38,8 @@ const StyledHeader = styled.header`
justify-content: space-between;
align-items: center;
}
+
+ ${media.small`padding-top: 2.125rem;`};
`;
const LogoMark = styled.div`
@@ -53,6 +57,8 @@ const Title = styled.h1`
font-size: 1.5rem;
margin: 0;
margin-left: 0.8125rem;
+
+ ${media.small`font-size: 1.25rem;`};
`;
const StyledLink = styled(Small)`
diff --git a/packages/dev-tools-pages/ts/components/Trace.tsx b/packages/dev-tools-pages/ts/components/Trace.tsx
index f4b4e76a3..545e87d53 100644
--- a/packages/dev-tools-pages/ts/components/Trace.tsx
+++ b/packages/dev-tools-pages/ts/components/Trace.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import styled from 'styled-components';
-import { colors } from '../variables';
+import { colors, media } from '../variables';
import { withContext, Props } from './withContext';
import { Alpha, Beta, Gamma } from './Typography';
@@ -101,6 +101,8 @@ const StyledSection =
background: linear-gradient(to right, ${colors.black} 50%, ${props => props.background} 50%);
padding-top: 6.25rem;
padding-bottom: 5.25rem;
+
+ ${media.small`background: none`};
`;
const Wrapper = styled(Container)`
@@ -108,7 +110,14 @@ const Wrapper = styled(Container)`
${Alpha} {
padding-bottom: 2.5rem;
+
+ ${media.small`padding-bottom: 1.875rem;`};
}
+
+ ${media.small`
+ display: block;
+ width: 100%;
+ `};
`;
const Block =
@@ -125,27 +134,55 @@ const Block =
:last-of-type {
padding-left: 6.25rem;
}
+
+ ${media.small`
+ width: 100%;
+ padding-top: 2.5rem;
+ padding-bottom: 3.4375rem;
+
+ :first-of-type {
+ padding-left: 1.875rem;
+ padding-right: 1.875rem;
+ }
+ :last-of-type {
+ padding-left: 1.875rem;
+ padding-right: 1.875rem;
+ }
+ `};
`;
const MainCopy = styled(Beta)`
margin-bottom: 3.1875rem;
+ ${media.small`
+ margin-bottom: 1.125rem;
+ font-size: 1rem;
+ `};
`;
const List = styled.ul`
margin-top: 6.25rem;
margin-bottom: 0;
padding: 0;
+
+ ${media.small`margin-top: 3.4375rem;`};
`;
const Item = styled.li`
display: flex;
align-items: center;
- margin-bottom: 4.4375rem;
+
+ :not(:last-child) {
+ margin-bottom: 4.4375rem;
+
+ ${media.small`margin-bottom: 3.4375rem;`};
+ }
`;
const Copy = styled.div`
max-width: 20rem;
margin-right: 5.875rem;
+
+ ${media.small`margin-right: 2.0625rem;`};
`;
export default withContext(Trace);
diff --git a/packages/dev-tools-pages/ts/components/Typography.tsx b/packages/dev-tools-pages/ts/components/Typography.tsx
index 9251d31b4..deac8a976 100644
--- a/packages/dev-tools-pages/ts/components/Typography.tsx
+++ b/packages/dev-tools-pages/ts/components/Typography.tsx
@@ -1,8 +1,11 @@
import styled from 'styled-components';
+import { media } from '../variables';
const Alpha = styled.h2`
font-size: 1.75rem;
line-height: 1;
+
+ ${media.small`font-size: 1.5rem;`};
`;
const Beta = styled.h3`
@@ -12,6 +15,8 @@ const Beta = styled.h3`
const Gamma = styled.h4`
font-size: 1rem;
+
+ ${media.small`font-size: 0.875rem;`};
`;
const Small = styled.p`
diff --git a/packages/dev-tools-pages/ts/globalStyles.tsx b/packages/dev-tools-pages/ts/globalStyles.tsx
index 1a2a1769a..e8ef630da 100644
--- a/packages/dev-tools-pages/ts/globalStyles.tsx
+++ b/packages/dev-tools-pages/ts/globalStyles.tsx
@@ -1,4 +1,5 @@
import { createGlobalStyle } from 'styled-components';
+import { media } from './variables';
import styledNormalize from 'styled-normalize';
import hljsStyles from 'highlight.js/styles/github-gist.css';
@@ -44,6 +45,9 @@ const BaseStyles = createGlobalStyle`
font-weight: 300;
font-size: 1rem;
line-height: 1.8;
+
+ ${media.small`font-size: 0.875rem;`};
+
}
a {