From ec32c0dea69955887522fb1607fa002d14e8af57 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Sat, 23 Mar 2024 13:43:06 +0300 Subject: [PATCH] apps/web: remove page elements order changing --- apps/web/Components/Layout/Page.jsx | 22 ++-------------------- apps/web/config/ui.js | 2 +- apps/web/styles/mq.ts | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/apps/web/Components/Layout/Page.jsx b/apps/web/Components/Layout/Page.jsx index b9350d3..33f641e 100644 --- a/apps/web/Components/Layout/Page.jsx +++ b/apps/web/Components/Layout/Page.jsx @@ -1,30 +1,12 @@ -import { max, min } from '@/styles/mq'; -import styled, { css } from 'styled-components'; +import { min } from '@/styles/mq'; +import styled from 'styled-components'; import { Box } from 'ui/grid'; -const order = css` - ${max('laptop')} { - #settings { - order: 1; - } - - #form { - order: 2; - } - - #output { - order: 3; - } - } -`; - export const Grid = styled(Box)` display: flex; flex-direction: column; gap: 10px; - ${order} - ${min('laptop')} { display: grid; align-items: flex-start; diff --git a/apps/web/config/ui.js b/apps/web/config/ui.js index 0f2f862..57d7c1a 100644 --- a/apps/web/config/ui.js +++ b/apps/web/config/ui.js @@ -1,5 +1,5 @@ /* eslint-disable canonical/sort-keys */ -const threshold = 1; +const threshold = 0; const screens = { tablet: 768, diff --git a/apps/web/styles/mq.ts b/apps/web/styles/mq.ts index 751354f..bd752cc 100644 --- a/apps/web/styles/mq.ts +++ b/apps/web/styles/mq.ts @@ -1,7 +1,7 @@ import { screens, threshold } from '@/config/ui'; export function min(breakpoint: keyof typeof screens) { - return `@media (min-width: calc(${screens[breakpoint]}px))`; + return `@media (min-width: calc(${screens[breakpoint]}px + ${threshold}px))`; } export function max(breakpoint: keyof typeof screens) { return `@media (max-width: calc(${screens[breakpoint]}px - ${threshold}px))`;