summaryrefslogtreecommitdiff
path: root/css/style.css
diff options
context:
space:
mode:
Diffstat (limited to 'css/style.css')
-rw-r--r--css/style.css163
1 files changed, 132 insertions, 31 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);
+}