Skip to content

Commit

Permalink
Use class instead of inline style
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhjacobs committed Feb 16, 2024
1 parent 4d81cdf commit a3312f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 10 additions & 0 deletions src/app/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
width: 400px;
}

.staticLogo {
width: 85%;
height: auto;
margin: 0 auto;
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
}

.title {
text-align: center;
margin-bottom: calc(var(--mantine-spacing-xl));
Expand Down
9 changes: 2 additions & 7 deletions src/components/logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import React from "react";
import Script from "next/script";
import classes from "../app/index.module.css";

declare global {
interface Window {
Expand Down Expand Up @@ -40,13 +41,7 @@ export default class InteractiveLogo extends React.Component<LogoProps> {
const staticLogo = document.createElement("IMG") as HTMLImageElement;
staticLogo.src = "/logo.svg";
staticLogo.alt = "Ruffle Logo";
staticLogo.style.width = "85%";
staticLogo.style.height = "auto";
staticLogo.style.margin = "0 auto";
staticLogo.style.display = "block";
staticLogo.style.position = "relative";
staticLogo.style.top = "50%";
staticLogo.style.transform = "translateY(-50%)";
staticLogo.className = classes.staticLogo;
this.container.current.textContent = "";
this.container.current.appendChild(staticLogo);
}
Expand Down

0 comments on commit a3312f9

Please sign in to comment.