Style reorganization

This commit is contained in:
Anton Vakhrushev 2018-06-17 16:41:13 +03:00
parent 54185a59ac
commit 870cbe0147
6 changed files with 58 additions and 39 deletions

View File

@ -3,16 +3,12 @@
html, html,
body { body {
font-size: $base-font-size; font-size: $base-font-size;
font-family: 'PT Serif', serif; font-family: $base-font-family;
padding: 0; padding: 0;
margin: 0; margin: 0;
@media (max-width: $preferred-width - 1px) { @media (max-width: $first-media-step) {
font-size: $base-font-size - 2px; font-size: $base-font-size - 2px;
margin: {
left: 0.8em;
right: 0.8em;
}
} }
} }

View File

@ -5,9 +5,12 @@
width: $preferred-width; width: $preferred-width;
margin: 0 auto; margin: 0 auto;
@media (max-width: 480px) { @media (max-width: $first-media-step) {
margin: 10px 0;
width: auto; width: auto;
margin: {
left: $mobile-margin;
right: $mobile-margin;
}
} }
} }
@ -17,8 +20,8 @@
margin-bottom: 0.3em; margin-bottom: 0.3em;
font-weight: normal; font-weight: normal;
@media (max-width: 839px) { @media (max-width: $first-media-step) {
margin-top: 0.8em; margin-top: $mobile-margin;
} }
} }

View File

@ -0,0 +1,21 @@
.navigation {
display: block;
border-bottom: 1px solid #eee;
&__actions {
list-style: none;
margin: 0;
padding: 0;
}
&__action {
display: inline-block;
margin: {
top: 1em;
bottom: 1em;
}
}
&__link {
}
}

View File

@ -1,34 +1,17 @@
@import '../vars'; @import '../vars';
@import '../base_style'; @import '../base_style';
@import 'navigation';
.navigation {
display: block;
border-bottom: 1px solid #eee;
}
.navigation__actions {
list-style: none;
margin: 0;
padding: 0;
}
.navigation__action {
display: inline-block;
margin: {
top: 1em;
bottom: 1em;
}
}
.navigation__link {
}
.page { .page {
width: $preferred-width; width: $preferred-width;
margin: 0 auto; margin: 0 auto;
@media (max-width: 480px) { @media (max-width: $first-media-step) {
width: auto; width: auto;
margin: {
left: $mobile-margin;
right: $mobile-margin;
}
} }
} }

View File

@ -80,19 +80,28 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
@import '../vars.scss';
$button-radius: 0.5em; $button-radius: 0.5em;
$font-size: 20px;
.app { .app {
display: block; display: block;
margin: 2em auto; margin: 2em auto;
width: 400px;
text-align: center;
padding: 2em; padding: 2em;
@media (max-width: 749px) { text-align: center;
padding: 2em 0; border: 1px solid transparent;
@media (max-width: $first-media-step) {
padding: {
right: 0;
left: 0;
}
width: auto; width: auto;
} }
&:hover {
border-color: #ccc;
}
} }
.score { .score {
@ -112,7 +121,8 @@ $font-size: 20px;
background-color: #405480; background-color: #405480;
padding: 0.6em; padding: 0.6em;
border: none; border: none;
font-size: $font-size; font-size: 100%;
font-family: inherit;
} }
.restart-button { .restart-button {

View File

@ -1,5 +1,11 @@
$base-font-family: 'PT Serif', serif;
// Базовый размер шрифта // Базовый размер шрифта
$base-font-size: 20px; $base-font-size: 20px;
// Ширина страницы // Ширина страницы
$preferred-width: 700px; $preferred-width: 700px;
$first-media-step: $preferred-width - 1px;
$mobile-margin: 0.8em;