Skip to content

Commit

Permalink
Remove SASS, use vanilla CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterTYLiu committed Feb 13, 2024
1 parent 70b256c commit 9f7c26d
Show file tree
Hide file tree
Showing 21 changed files with 1,558 additions and 1,296 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
- Customizable controls
- Installable for offline play

Built with Vite + React + TypeScript + SASS
Built with Vite + React + TypeScript

---

Expand Down
2,761 changes: 1,513 additions & 1,248 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"canvas-confetti": "^1.9.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-swipeable": "^7.0.1",
"sass": "^1.69.5"
"react-swipeable": "^7.0.1"
},
"devDependencies": {
"@types/canvas-confetti": "^1.6.4",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { useState, useEffect } from "react";
import { defaultSettings, SettingsContext, type Settings } from "./hooks/useSettingsContext";
import { GameStateContext, type GameState } from "./hooks/useGameStateContext";
import confetti from "canvas-confetti";
import styles from "./App.module.scss";
import styles from "./App.module.css";
import generateTiles from "./utils/generateTiles";
import Tile from "./components/tile/Tile";
import PregameTile from "./components/tile/PregameTile";
import Header from "./components/header/Header";

const version = "1.0.6";
const version = "1.0.7";

function App() {
const settingsOnLoad: Settings = { ...defaultSettings };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
border: 2px solid rgb(55, 48, 9);
}
}
}

.start {
width: 100%;
height: 40px;
font-family: "rs-quill";
font-size: 18px;
.start {
width: 100%;
height: 40px;
font-family: "rs-quill";
font-size: 18px;
}
}
2 changes: 1 addition & 1 deletion src/components/aboutModal/AboutModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useEffect, type Dispatch } from "react";
import styles from "./AboutModal.module.scss";
import styles from "./AboutModal.module.css";

export default function AboutModal({ shown, setShown }: { shown: boolean; setShown: Dispatch<boolean> }) {
const dialogRef = useRef<HTMLDialogElement | null>(null);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from "react";
import styles from "./Header.module.scss";
import styles from "./Header.module.css";
import { useGameStateContext } from "../../hooks/useGameStateContext";
import { useSettingsContext } from "../../hooks/useSettingsContext";
import SettingsModal from "../settingsModal/SettingsModal";
Expand Down
2 changes: 1 addition & 1 deletion src/components/instaloseToast/InstaloseToast.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styles from "./InstaloseToast.module.scss";
import styles from "./InstaloseToast.module.css";

export default function InstaloseToast({ open }: { open: boolean }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/mineCounter/MineCounter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useGameStateContext } from "../../hooks/useGameStateContext";
import styles from "../../styles/counter.module.scss";
import styles from "../../styles/counter.module.css";

export default function MineCounter() {
const { gameState } = useGameStateContext();
Expand Down
2 changes: 1 addition & 1 deletion src/components/recordModal/RecordModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRef, useEffect, type Dispatch } from "react";
import styles from "./RecordModal.module.scss";
import styles from "./RecordModal.module.css";
import { useSettingsContext } from "../../hooks/useSettingsContext";
import { difficultiesDict, sizesDict } from "../../utils/settings";

Expand Down
4 changes: 2 additions & 2 deletions src/components/settingsModal/SettingsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef, useEffect, type Dispatch } from "react";
import { Settings, useSettingsContext } from "../../hooks/useSettingsContext";
import styles from "./SettingsModal.module.scss";
import { type Settings, useSettingsContext } from "../../hooks/useSettingsContext";
import styles from "./SettingsModal.module.css";
import { sizesDict, difficultiesDict, controlsDict } from "../../utils/settings";

export default function SettingsModal({ shown, setShown }: { shown: boolean; setShown: Dispatch<boolean> }) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tile/PregameTile.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styles from "./Tile.module.scss";
import styles from "./Tile.module.css";
import { useGameStateContext } from "../../hooks/useGameStateContext";
import { useSettingsContext } from "../../hooks/useSettingsContext";
import generateTiles from "../../utils/generateTiles";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,30 @@
margin: 0;
text-shadow: none;
}
}

.is-1 {
color: rgb(138, 88, 0);
}
.is-2 {
color: green;
}
.is-3 {
color: rgb(201, 0, 0);
}
.is-4 {
color: blue;
}
.is-5 {
color: purple;
}
.is-6 {
color: rgb(0, 131, 151);
}
.is-7 {
color: rgb(159, 0, 101);
}
.is-8 {
color: black;
&.is-1 {
color: rgb(138, 88, 0);
}
&.is-2 {
color: green;
}
&.is-3 {
color: rgb(201, 0, 0);
}
&.is-4 {
color: blue;
}
&.is-5 {
color: purple;
}
&.is-6 {
color: rgb(0, 131, 151);
}
&.is-7 {
color: rgb(159, 0, 101);
}
&.is-8 {
color: black;
}
}

@keyframes plantFlag {
Expand Down
2 changes: 1 addition & 1 deletion src/components/tile/Tile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useSwipeable } from "react-swipeable";
import { GameState, useGameStateContext } from "../../hooks/useGameStateContext";
import { useSettingsContext } from "../../hooks/useSettingsContext";
import styles from "./Tile.module.scss";
import styles from "./Tile.module.css";
import chord from "../../utils/chord";
import floodFill from "../../utils/floodFill";

Expand Down
2 changes: 1 addition & 1 deletion src/components/timer/Timer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useGameStateContext } from "../../hooks/useGameStateContext";
import { useSettingsContext } from "../../hooks/useSettingsContext";
import RecordModal from "../recordModal/RecordModal";
import InstaloseToast from "../instaloseToast/InstaloseToast";
import styles from "../../styles/counter.module.scss";
import styles from "../../styles/counter.module.css";

export default function Timer() {
const { gameState, setGameState } = useGameStateContext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// A shared module for the timer and the mine counter
/* A shared module for the timer and the mine counter */

.counter {
border: 1px solid rgb(66, 55, 41);
Expand Down

0 comments on commit 9f7c26d

Please sign in to comment.