Skip to content

Commit

Permalink
Responsive design #2
Browse files Browse the repository at this point in the history
Responsive design, mobile first (#2 commit)
  • Loading branch information
Brugarolas committed Dec 29, 2018
1 parent f24e415 commit e4e07c9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/assets/styles/mixins.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@
.fontOpenSans() {
font-family: 'Open Sans', sans-serif;
}

.disableHighlight() {
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-tap-highlight-color: transparent;
}
2 changes: 2 additions & 0 deletions src/ui/components/cancel-button.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import (less, reference) '../../assets/styles/colors.less';
@import (less, reference) "../../assets/styles/mixins.less";

.cancel-button {
border: none;
Expand All @@ -8,6 +9,7 @@
overflow: visible;
outline: none;
text-decoration: none;
.disableHighlight();
background: transparent;
cursor: pointer;

Expand Down
1 change: 1 addition & 0 deletions src/ui/components/city.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
box-sizing: border-box;
box-shadow: 0 1/8rem 1/8rem 0 @color-shadow;
cursor: pointer;
.disableHighlight();
transition: all 0.3s ease-in-out;

&:hover {
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/new-city-card.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
margin: 24px auto;
box-shadow: 0 1/8rem 1/8rem 0 @color-shadow;
cursor: pointer;
.disableHighlight();
transition: all 0.3s ease-in-out;

@media @tablet-above {
Expand Down
4 changes: 3 additions & 1 deletion src/ui/components/search-city-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class SearchCityForm extends Component {

searchCity = (event) => {
event.preventDefault();
this.props.searchCity(this.state.cityName);
if (this.state.cityName) {
this.props.searchCity(this.state.cityName);
}
}

render () {
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/search-city-form.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
padding: 5px 12px;
color: @color-white;
letter-spacing: 0.75px;
.disableHighlight();
transition: all .3s ease-in-out;

.icon {
Expand Down
3 changes: 3 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ module.exports = (env, args) => {
template: './src/index.html',
filename: './index.html',
favicon: './src/assets/logo.png',
meta: {
viewport: 'width=device-width, initial-scale=1, user-scalable=no, shrink-to-fit=no'
},
inject: true
}),
new HtmlWebpackIncludeAssetsPlugin({
Expand Down

0 comments on commit e4e07c9

Please sign in to comment.