Skip to content

Commit

Permalink
Use system fonts on more platforms
Browse files Browse the repository at this point in the history
This allows other platforms such as Windows, macOS and iOS to use their system fonts rather than downloading a copy of Roboto. It also makes the app feel a little closer to native on those platforms!
  • Loading branch information
ticky committed Jan 5, 2017
1 parent 9bb1b97 commit 1f3c895
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/components/button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Button = React.createClass({

render () {
const style = {
fontFamily: 'Roboto',
fontFamily: 'inherit',
display: this.props.block ? 'block' : 'inline-block',
width: this.props.block ? '100%' : 'auto',
position: 'relative',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const inputStyle = {
border: 'none',
padding: '10px',
paddingRight: '30px',
fontFamily: 'Roboto',
fontFamily: 'inherit',
background: '#282c37',
color: '#9baec8',
fontSize: '14px',
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/about.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

h1 {
font: 46px/52px 'Roboto', sans-serif;
font: 46px/52px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-weight: 600;
margin-bottom: 20px;
color: #2b90d9;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ table {
}

body {
font-family: 'Roboto', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #282c37 image-url('background-photo.jpeg');
background-size: cover;
background-attachment: fixed;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/components.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.button {
background-color: #2b90d9;
font-family: 'Roboto';
font-family: inherit;
display: inline-block;
position: relative;
box-sizing: border-box;
Expand Down Expand Up @@ -574,7 +574,7 @@
resize: none;
color: #282c37;
padding: 7px;
font-family: 'Roboto';
font-family: inherit;
font-size: 14px;
margin: 0;
resize: vertical;
Expand Down
6 changes: 3 additions & 3 deletions app/assets/stylesheets/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ code {
display: flex;

label {
font-family: 'Roboto';
font-family: inherit;
font-size: 16px;
color: #fff;
width: 100px;
Expand All @@ -48,7 +48,7 @@ code {
margin-bottom: 5px;

label {
font-family: 'Roboto';
font-family: inherit;
font-size: 14px;
color: white;
display: block;
Expand Down Expand Up @@ -83,7 +83,7 @@ code {
display: block;
width: 100%;
outline: 0;
font-family: 'Roboto';
font-family: inherit;

&:invalid {
box-shadow: none;
Expand Down
4 changes: 2 additions & 2 deletions public/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #282c37;
color: #9baec8;
text-align: center;
Expand All @@ -25,7 +25,7 @@
}

.dialog h1 {
font: 20px/28px 'Roboto', sans-serif;
font: 20px/28px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-weight: 400;
}
</style>
Expand Down
4 changes: 2 additions & 2 deletions public/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #282c37;
color: #9baec8;
text-align: center;
Expand All @@ -25,7 +25,7 @@
}

.dialog h1 {
font: 20px/28px 'Roboto', sans-serif;
font: 20px/28px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
font-weight: 400;
}
</style>
Expand Down
2 changes: 1 addition & 1 deletion storybook/storybook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,500);

#root {
font-family: 'Roboto', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #282c37;
font-size: 13px;
line-height: 18px;
Expand Down

0 comments on commit 1f3c895

Please sign in to comment.