From 0db4951e2533db16c29ded48b24c64fc9e26f788 Mon Sep 17 00:00:00 2001 From: Stanislau Vyrski Date: Sun, 14 Jan 2024 14:03:22 +0300 Subject: [PATCH] fix: fixed a problem where vertical scrolling appeared (Sun, Jan 14, 2024, 2:03:16 PM) --- css/style.css | 2 +- index.html | 4 ++-- src/sass/style.scss | 31 +++++++++++++++---------------- 3 files changed, 18 insertions(+), 19 deletions(-) diff --git a/css/style.css b/css/style.css index 5884046..4d6a981 100644 --- a/css/style.css +++ b/css/style.css @@ -1 +1 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;height:100%}body{margin:0;font-family:"Noto Sans",sans-serif;letter-spacing:1px}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;text-decoration:none;color:inherit}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}ul{list-style-type:none;padding:0}svg{cursor:pointer;pointer-events:auto}h1,h2,h3,h4,p,ul{margin:0}body{background-image:url("../images/1.jpg");background-size:cover;height:100%}.container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:normal;-ms-flex-pack:normal;justify-content:normal;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:1920px;min-height:100vh;margin:0 auto;padding:20px 10px}.main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;justify-content:center;-webkit-box-flex:1;-ms-flex:1;flex:1;gap:10px}.main__title{font-size:clamp(22px,5vw,35px);-webkit-transition:0.3s;transition:0.3s;color:#ffffff}@media (hover:hover){.main__title:hover{color:#e2dcdc}}.main__res{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:50px;color:white;font-size:clamp(26px,4vw,38px);-webkit-animation-name:changeColor;animation-name:changeColor;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.main__square{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;-webkit-box-pack:normal;-ms-flex-pack:normal;justify-content:normal;-ms-flex-wrap:wrap;flex-wrap:wrap;width:405px;height:405px;margin-bottom:20px;background-color:rgba(233,233,233,0.77);cursor:pointer}.main__square-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:135px;height:135px;font-size:clamp(90px,15vw,105px);border:1px solid #000;color:#000;text-transform:uppercase;-webkit-transition:0.3s;transition:0.3s}@media (hover:hover){.main__square-item:hover{border:2px solid #fff;border-radius:2%;color:rgb(68,67,67);background-color:rgba(255,255,255,0.88)}}.main__square-item:active{border:2px solid #000;border-radius:2%;color:rgb(68,67,67);background-color:rgba(255,255,255,0.88)}.main__square-item_win{background-color:rgba(24,196,24,0.5215686275)}.main__square-item_win:hover{background-color:rgba(35,169,35,0.5215686275)}.main__button{width:150px;height:40px;margin-bottom:10px;background-color:rgba(255,255,255,0.77);color:black;border:2px solid black;border-radius:5px;cursor:pointer;-webkit-transition:0.3s;transition:0.3s;font-size:20px}@media (hover:hover){.main__button:hover{background-color:rgb(255,255,255)}}.main__button:active{background-color:rgb(255,255,255)}@-webkit-keyframes changeColor{0%{color:#ffffff}50%{color:rgba(102,0,255,0)}to{color:#ffffff}}@keyframes changeColor{0%{color:#ffffff}50%{color:rgba(102,0,255,0)}to{color:#ffffff}}@media screen and (max-width:680px){.main__square{width:300px;height:300px}}@media screen and (max-width:680px) and (max-width:680px){.main__square-item{width:100px;height:100px}} \ No newline at end of file +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;height:100%}body{margin:0;font-family:"Noto Sans",sans-serif;letter-spacing:1px}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;text-decoration:none;color:inherit}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}ul{list-style-type:none;padding:0}svg{cursor:pointer;pointer-events:auto}h1,h2,h3,h4,p,ul{margin:0}body{background-image:url("../images/1.jpg");background-size:cover;height:100%}.container{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;max-width:1920px;min-height:100vh;margin:0 auto;padding:20px 10px}.main{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;gap:8px}.main__res{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;height:50px;color:white;font-size:clamp(26px,4vw,38px);-webkit-animation-name:changeColor;animation-name:changeColor;-webkit-animation-duration:1.5s;animation-duration:1.5s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.main__square{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;-webkit-box-pack:normal;-ms-flex-pack:normal;justify-content:normal;-ms-flex-wrap:wrap;flex-wrap:wrap;width:405px;height:405px;margin-bottom:20px;background-color:rgba(233,233,233,0.77);cursor:pointer}.main__square-item{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:135px;height:135px;font-size:clamp(90px,15vw,105px);border:1px solid #000;color:#000;text-transform:uppercase;-webkit-transition:0.3s;transition:0.3s}@media (hover:hover){.main__square-item:hover{border:2px solid #fff;border-radius:2%;color:rgb(68,67,67);background-color:rgba(255,255,255,0.88)}}.main__square-item:active{border:2px solid #000;border-radius:2%;color:rgb(68,67,67);background-color:rgba(255,255,255,0.88)}.main__square-item_win{background-color:rgba(24,196,24,0.5215686275)}.main__square-item_win:hover{background-color:rgba(35,169,35,0.5215686275)}.main__button{width:150px;height:40px;margin-bottom:10px;background-color:rgba(255,255,255,0.77);color:black;border:2px solid black;border-radius:5px;cursor:pointer;-webkit-transition:0.3s;transition:0.3s;font-size:20px}@media (hover:hover){.main__button:hover{background-color:rgb(255,255,255)}}.main__button:active{background-color:rgb(255,255,255)}@-webkit-keyframes changeColor{0%{color:#ffffff}50%{color:rgba(102,0,255,0)}to{color:#ffffff}}@keyframes changeColor{0%{color:#ffffff}50%{color:rgba(102,0,255,0)}to{color:#ffffff}}.main__title{font-size:clamp(22px,5vw,35px);-webkit-transition:0.3s;transition:0.3s;color:#ffffff}@media (hover:hover){.main__title:hover{color:#e2dcdc}}@media screen and (max-width:680px){.main__square{width:300px;height:300px}}@media screen and (max-width:680px) and (max-width:680px){.main__square-item{width:100px;height:100px}} \ No newline at end of file diff --git a/index.html b/index.html index 7c63868..ce804cf 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@

Naugh and crosses

+
@@ -38,8 +39,7 @@

Naugh

- - + \ No newline at end of file diff --git a/src/sass/style.scss b/src/sass/style.scss index 375674c..19c0f05 100644 --- a/src/sass/style.scss +++ b/src/sass/style.scss @@ -7,7 +7,7 @@ body { } .container { - @include flexBox(column, center); + @include flexBox(column, center, center); max-width: 1920px; min-height: 100vh; margin: 0 auto; @@ -16,21 +16,7 @@ body { .main { @include flexBox(column, center, center); - justify-content: center; - flex: 1; - gap: 10px; - - &__title { - font-size: clamp(22px, 5vw, 35px); - transition: 0.3s; - color: #ffffff; - - @media (hover: hover) { - &:hover { - color: #e2dcdc; - } - } - } + gap: 8px; &__res { @include flexBox(column, center, center); @@ -118,4 +104,17 @@ body { } } +.main__title { + font-size: clamp(22px, 5vw, 35px); + -webkit-transition: 0.3s; + transition: 0.3s; + color: #ffffff; +} + +@media (hover: hover) { + .main__title:hover { + color: #e2dcdc; + } +} + @import 'adaptive';