Skip to content

Commit

Permalink
Using media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
codegino committed Dec 1, 2021
1 parent 55e1aa5 commit 5ab6fc7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
20 changes: 12 additions & 8 deletions app/routes/words.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ import { supabase } from "~/libs/supabase-client";
import { Word } from "~/models/word";
import type { LinksFunction } from "remix";
import styles from "~/styles/words.css";
import smStyles from "~/styles/words-sm.css";

export const links: LinksFunction = () => {
return [
{
rel: "stylesheet",
href: styles,
},
];
};
export const links: LinksFunction = () => [
{
rel: "stylesheet",
href: styles,
},
{
rel: "stylesheet",
href: smStyles,
media: "(max-width: 600px)",
},
];

export const loader: LoaderFunction = async () => {
const { data: words } = await supabase
Expand Down
8 changes: 8 additions & 0 deletions app/styles/words-sm.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.words__content {
grid-template-columns: 1fr;
border: none;
}

.words__content form {
margin-top: 1rem;
}

0 comments on commit 5ab6fc7

Please sign in to comment.