diff options
Diffstat (limited to 'css')
| -rw-r--r-- | css/style.css | 163 | ||||
| -rw-r--r-- | css/style.min.css | 1 | ||||
| -rw-r--r-- | css/wordsearch.css | 65 | ||||
| -rw-r--r-- | css/wordsearch.min.css | 1 |
4 files changed, 132 insertions, 98 deletions
diff --git a/css/style.css b/css/style.css index 51304ed..73e9a77 100644 --- a/css/style.css +++ b/css/style.css @@ -1,58 +1,159 @@ -/* CSS reset */ +*, *::before, *::after { + box-sizing: border-box; +} + +:root { + --stone-50: oklch(98.5% 0.001 106.423); + --stone-100: oklch(97% 0.001 106.424); + --stone-200: oklch(92.3% 0.003 48.717); + --stone-500: oklch(55.3% 0.013 58.071); + --stone-700: oklch(37.4% 0.01 67.558); + --stone-800: oklch(26.8% 0.007 34.298); +} -body, h1 { +body, h1, h2, p, ul { margin: 0; padding: 0; } -h1 { - text-transform: uppercase; +ul { + list-style-type: none; } body { - color: #333; + font-family: system-ui, -apple-system, sans-serif; + color: var(--stone-800); + background-color: var(--stone-100); + min-height: 100vh; } -/* Common */ +.page { + position: relative; + display: grid; + grid-template-areas: + "title title title" + "board . words" + "status status status"; + grid-template-columns: auto 2.5rem auto; + justify-content: center; + margin-inline: auto; + width: min(62rem, calc(100% - 2rem)); +} -.fix { - *zoom: 1; +.page__header { + margin-block: 2rem; + grid-area: title; + text-align: center; } -.fix:after { - display: table; - clear: both; - content: ''; +.page__board { + grid-area: board; + display: flex; + justify-content: center; } -/* Home */ +.page__words { + grid-area: words; +} -.wrap { - width: 960px; - margin: 0 auto; - padding: 40px 0; +.page__footer { + margin-block: 2rem; + grid-area: status; text-align: center; - position:relative; } -.logo, #gameArea { - margin-bottom: 40px; +.page__title { + font-weight: 700; + font-size: clamp(1.25rem, 4vw, 2rem); + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--stone-800); +} + +.page__status { + font-size: 0.85rem; + letter-spacing: 0.02em; + color: var(--stone-500); +} + +.word-list { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.word-list__item { + font-weight: 500; + font-size: 0.875rem; + letter-spacing: 0.03em; + color: var(--stone-800); + transition: opacity 0.2s, color 0.2s; } -.ws-area, .ws-words { - display: inline-block; - vertical-align: top; +.word-list__item--found { + text-decoration: line-through; + opacity: 0.4; } -.ws-words { - margin-left: 20px; - text-align: left; +@media (max-width: 860px) { + .page { + grid-template-columns: auto; + grid-template-areas: + "title" + "board" + "words" + "status"; + } + + .page__header { + margin-block: 1rem; + } + + .word-list { + margin-block-start: 1rem; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + gap: 0.75rem 1.25rem; + } + + .page__footer { + margin-block: 2rem 1rem; + } } -.ws-word { - margin-bottom: 4px; +.complete { + position: absolute; + background-color: color-mix(in srgb, var(--stone-50) 92%, transparent); + width: 100%; + height: 100%; + left: 0; + top: 0; } -.ws-words ::first-letter{ - text-transform : capitalize; -}
\ No newline at end of file +.complete__inner { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; +} + +.complete__content { + padding: 1.5rem; + text-align: center; +} + +.complete__title { + font-weight: 700; + font-size: 1.75rem; + letter-spacing: 0.06em; + text-transform: uppercase; + color: var(--stone-800); +} + +.complete__message { + margin-block-start: 0.5rem; + font-size: 1rem; + color: var(--stone-700); +} diff --git a/css/style.min.css b/css/style.min.css deleted file mode 100644 index 6754647..0000000 --- a/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -body,h1{margin:0;padding:0}h1{text-transform:uppercase}body{color:#333}.fix:after{display:table;clear:both;content:''}.wrap{width:960px;margin:0 auto;padding:40px 0;text-align:center;position:relative}#gameArea,.logo{margin-bottom:40px}.ws-area,.ws-words{display:inline-block;vertical-align:top}.ws-words{margin-left:20px;text-align:left}.ws-word{margin-bottom:4px}.ws-words ::first-letter{text-transform:capitalize}
\ No newline at end of file diff --git a/css/wordsearch.css b/css/wordsearch.css deleted file mode 100644 index 149c36e..0000000 --- a/css/wordsearch.css +++ /dev/null @@ -1,65 +0,0 @@ -/* Wordsearch */ - -.ws-area { - background: #fafafa; - display: inline-block; - padding: 20px; - border-radius: 10px; - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} - -.ws-row { - line-height: 0; -} - -.ws-col { - cursor: pointer; -} - -.ws-col.ws-selected { - background: #eee; -} - -.ws-found { - background: yellow; -} - -.ws-game-over-outer { - background: rgba(0, 0, 0, 0.85); - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} - -.ws-game-over-inner { - width:100%; - height:100%; - padding:0; - margin:0; - display:table; -} - -.ws-game-over { - display:table-cell; - vertical-align:middle; -} - -.ws-game-over h2 { - color:#FFFFFF; - font-size:2em; - text-transform:uppercase; - padding:0; - margin:0 0 9px 0; -} - -.ws-game-over p { - color:#FFFFFF; - font-size:1em; - padding:0; - margin:0; -}
\ No newline at end of file diff --git a/css/wordsearch.min.css b/css/wordsearch.min.css deleted file mode 100644 index 0e49dc3..0000000 --- a/css/wordsearch.min.css +++ /dev/null @@ -1 +0,0 @@ -.ws-area{background:#fafafa;display:inline-block;border-radius:10px;-moz-user-select:0;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;padding:20px}.ws-row{line-height:0}.ws-col{cursor:pointer}.ws-col.ws-selected{background:#eee}.ws-found{background:#FF0}.ws-game-over-outer{background:rgba(0,0,0,0.85);height:100%;left:0;position:absolute;top:0;width:100%}.ws-game-over-inner{width:100%;height:100%;display:table;margin:0;padding:0}.ws-game-over{display:table-cell;vertical-align:middle}.ws-game-over h2{color:#FFF;font-size:2em;text-transform:uppercase;margin:0 0 9px;padding:0}.ws-game-over p{color:#FFF;font-size:1em;margin:0;padding:0}
\ No newline at end of file |
