Commit c43c8de6 authored by Jack Short's avatar Jack Short Committed by GitHub

chore: updating breakpoints (#4465)

* chore: updating breakpoints

* deprecating old breakpoints

* using breakpoints in theme instead of media queries
parent 9d40db5b
...@@ -24,7 +24,7 @@ const HeaderRow = styled.div` ...@@ -24,7 +24,7 @@ const HeaderRow = styled.div`
padding: 1rem 1rem; padding: 1rem 1rem;
font-weight: 500; font-weight: 500;
color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.deprecated_primary1 : 'inherit')}; color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.deprecated_primary1 : 'inherit')};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
padding: 1rem; padding: 1rem;
`}; `};
` `
...@@ -74,7 +74,7 @@ const AccountGroupingRow = styled.div` ...@@ -74,7 +74,7 @@ const AccountGroupingRow = styled.div`
const AccountSection = styled.div` const AccountSection = styled.div`
padding: 0rem 1rem; padding: 0rem 1rem;
${({ theme }) => theme.mediaWidth.upToMedium`padding: 0rem 1rem 1.5rem 1rem;`}; ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`padding: 0rem 1rem 1.5rem 1rem;`};
` `
const YourAccount = styled.div` const YourAccount = styled.div`
......
...@@ -15,7 +15,7 @@ const ResponsiveText = styled(ThemedText.DeprecatedLabel)` ...@@ -15,7 +15,7 @@ const ResponsiveText = styled(ThemedText.DeprecatedLabel)`
line-height: 16px; line-height: 16px;
font-size: 14px; font-size: 14px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 12px; font-size: 12px;
line-height: 12px; line-height: 12px;
`}; `};
......
...@@ -39,7 +39,7 @@ const Wrapper = styled.div` ...@@ -39,7 +39,7 @@ const Wrapper = styled.div`
padding: 16px 20px; padding: 16px 20px;
position: absolute; position: absolute;
right: 16px; right: 16px;
@media screen and (min-width: ${MEDIA_WIDTHS.upToMedium}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToMedium}px) {
display: block; display: block;
} }
` `
......
...@@ -53,7 +53,7 @@ const FlyoutMenu = styled.div` ...@@ -53,7 +53,7 @@ const FlyoutMenu = styled.div`
width: 272px; width: 272px;
z-index: 99; z-index: 99;
padding-top: 10px; padding-top: 10px;
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
top: 40px; top: 40px;
} }
` `
...@@ -112,7 +112,7 @@ const NetworkLabel = styled.div` ...@@ -112,7 +112,7 @@ const NetworkLabel = styled.div`
` `
const SelectorLabel = styled(NetworkLabel)` const SelectorLabel = styled(NetworkLabel)`
display: none; display: none;
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
display: block; display: block;
margin-right: 8px; margin-right: 8px;
} }
...@@ -126,7 +126,7 @@ const NetworkAlertLabel = styled(NetworkLabel)` ...@@ -126,7 +126,7 @@ const NetworkAlertLabel = styled(NetworkLabel)`
font-size: 1rem; font-size: 1rem;
width: fit-content; width: fit-content;
font-weight: 500; font-weight: 500;
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
display: block; display: block;
} }
` `
...@@ -153,12 +153,12 @@ const SelectorControls = styled.div<{ supportedChain: boolean }>` ...@@ -153,12 +153,12 @@ const SelectorControls = styled.div<{ supportedChain: boolean }>`
} }
` `
const SelectorLogo = styled(Logo)` const SelectorLogo = styled(Logo)`
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
margin-right: 8px; margin-right: 8px;
} }
` `
const SelectorWrapper = styled.div` const SelectorWrapper = styled.div`
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
position: relative; position: relative;
} }
` `
......
...@@ -26,7 +26,7 @@ const StyledPolling = styled.div<{ warning: boolean }>` ...@@ -26,7 +26,7 @@ const StyledPolling = styled.div<{ warning: boolean }>`
color: ${({ theme, warning }) => (warning ? theme.deprecated_yellow3 : theme.deprecated_green1)}; color: ${({ theme, warning }) => (warning ? theme.deprecated_yellow3 : theme.deprecated_green1)};
transition: 250ms ease color; transition: 250ms ease color;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
display: none; display: none;
`} `}
` `
......
...@@ -46,16 +46,16 @@ const HeaderFrame = styled.div<{ showBackground: boolean }>` ...@@ -46,16 +46,16 @@ const HeaderFrame = styled.div<{ showBackground: boolean }>`
transition: background-position 0.1s, box-shadow 0.1s; transition: background-position 0.1s, box-shadow 0.1s;
background-blend-mode: hard-light; background-blend-mode: hard-light;
${({ theme }) => theme.mediaWidth.upToLarge` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToLarge`
grid-template-columns: 48px 1fr 1fr; grid-template-columns: 48px 1fr 1fr;
`}; `};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
padding: 1rem; padding: 1rem;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
`}; `};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 1rem; padding: 1rem;
grid-template-columns: 36px 1fr; grid-template-columns: 36px 1fr;
`}; `};
...@@ -81,7 +81,7 @@ const HeaderElement = styled.div` ...@@ -81,7 +81,7 @@ const HeaderElement = styled.div`
margin-left: 8px; margin-left: 8px;
} }
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
align-items: center; align-items: center;
`}; `};
` `
...@@ -97,13 +97,13 @@ const HeaderLinks = styled(Row)` ...@@ -97,13 +97,13 @@ const HeaderLinks = styled(Row)`
grid-gap: 10px; grid-gap: 10px;
overflow: auto; overflow: auto;
align-items: center; align-items: center;
${({ theme }) => theme.mediaWidth.upToLarge` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToLarge`
justify-self: start; justify-self: start;
`}; `};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
justify-self: center; justify-self: center;
`}; `};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
justify-self: center; justify-self: center;
...@@ -157,7 +157,7 @@ const UNIWrapper = styled.span` ...@@ -157,7 +157,7 @@ const UNIWrapper = styled.span`
` `
const BalanceText = styled(Text)` const BalanceText = styled(Text)`
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
display: none; display: none;
`}; `};
` `
...@@ -168,7 +168,7 @@ const Title = styled.a` ...@@ -168,7 +168,7 @@ const Title = styled.a`
pointer-events: auto; pointer-events: auto;
justify-self: flex-start; justify-self: flex-start;
margin-right: 12px; margin-right: 12px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
justify-self: center; justify-self: center;
`}; `};
:hover { :hover {
......
...@@ -15,7 +15,7 @@ const IconWrapper = styled.div<{ size?: number }>` ...@@ -15,7 +15,7 @@ const IconWrapper = styled.div<{ size?: number }>`
height: ${({ size }) => (size ? size + 'px' : '32px')}; height: ${({ size }) => (size ? size + 'px' : '32px')};
width: ${({ size }) => (size ? size + 'px' : '32px')}; width: ${({ size }) => (size ? size + 'px' : '32px')};
} }
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
align-items: flex-end; align-items: flex-end;
`}; `};
` `
......
...@@ -48,11 +48,11 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>` ...@@ -48,11 +48,11 @@ const StyledInput = styled(NumericalInput)<{ usePercent?: boolean }>`
font-weight: 500; font-weight: 500;
padding: 0 10px; padding: 0 10px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 16px; font-size: 16px;
`}; `};
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
font-size: 12px; font-size: 12px;
`}; `};
` `
......
...@@ -110,7 +110,7 @@ const MenuFlyout = styled.span<{ flyoutAlignment?: FlyoutAlignment }>` ...@@ -110,7 +110,7 @@ const MenuFlyout = styled.span<{ flyoutAlignment?: FlyoutAlignment }>`
: css` : css`
left: 0rem; left: 0rem;
`}; `};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
bottom: unset; bottom: unset;
right: 0; right: 0;
left: unset; left: unset;
......
...@@ -59,11 +59,11 @@ const StyledDialogContent = styled(({ minHeight, maxHeight, mobile, isOpen, rede ...@@ -59,11 +59,11 @@ const StyledDialogContent = styled(({ minHeight, maxHeight, mobile, isOpen, rede
`} `}
display: flex; display: flex;
border-radius: 20px; border-radius: 20px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
width: 65vw; width: 65vw;
margin: 0; margin: 0;
`} `}
${({ theme, mobile }) => theme.mediaWidth.upToSmall` ${({ theme, mobile }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
width: 85vw; width: 85vw;
${ ${
mobile && mobile &&
......
...@@ -23,7 +23,7 @@ const Tabs = styled.div` ...@@ -23,7 +23,7 @@ const Tabs = styled.div`
const StyledHistoryLink = styled(HistoryLink)<{ flex: string | undefined }>` const StyledHistoryLink = styled(HistoryLink)<{ flex: string | undefined }>`
flex: ${({ flex }) => flex ?? 'none'}; flex: ${({ flex }) => flex ?? 'none'};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
flex: none; flex: none;
margin-right: 10px; margin-right: 10px;
`}; `};
......
...@@ -30,7 +30,7 @@ const Popup = styled.div` ...@@ -30,7 +30,7 @@ const Popup = styled.div`
padding-right: 35px; padding-right: 35px;
overflow: hidden; overflow: hidden;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
min-width: 290px; min-width: 290px;
&:not(:last-of-type) { &:not(:last-of-type) {
margin-right: 20px; margin-right: 20px;
......
...@@ -21,7 +21,7 @@ const Wrapper = styled(AutoColumn)` ...@@ -21,7 +21,7 @@ const Wrapper = styled(AutoColumn)`
color: ${({ theme }) => theme.deprecated_text1}; color: ${({ theme }) => theme.deprecated_text1};
overflow: hidden; overflow: hidden;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
max-width: 100%; max-width: 100%;
`} `}
` `
......
...@@ -17,7 +17,7 @@ const MobilePopupWrapper = styled.div<{ height: string | number }>` ...@@ -17,7 +17,7 @@ const MobilePopupWrapper = styled.div<{ height: string | number }>`
margin-bottom: ${({ height }) => (height ? '20px' : 0)}; margin-bottom: ${({ height }) => (height ? '20px' : 0)};
display: none; display: none;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: block; display: block;
padding-top: 20px; padding-top: 20px;
`}; `};
...@@ -35,8 +35,8 @@ const MobilePopupInner = styled.div` ...@@ -35,8 +35,8 @@ const MobilePopupInner = styled.div`
} }
` `
const StopOverflowQuery = `@media screen and (min-width: ${MEDIA_WIDTHS.upToMedium + 1}px) and (max-width: ${ const StopOverflowQuery = `@media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToMedium + 1}px) and (max-width: ${
MEDIA_WIDTHS.upToMedium + 500 MEDIA_WIDTHS.deprecated_upToMedium + 500
}px)` }px)`
const FixedPopupColumn = styled(AutoColumn)<{ extraPadding: boolean; xlPadding: boolean }>` const FixedPopupColumn = styled(AutoColumn)<{ extraPadding: boolean; xlPadding: boolean }>`
...@@ -47,7 +47,7 @@ const FixedPopupColumn = styled(AutoColumn)<{ extraPadding: boolean; xlPadding: ...@@ -47,7 +47,7 @@ const FixedPopupColumn = styled(AutoColumn)<{ extraPadding: boolean; xlPadding:
width: 100%; width: 100%;
z-index: 3; z-index: 3;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`}; `};
......
...@@ -12,7 +12,7 @@ const DesktopHeader = styled.div` ...@@ -12,7 +12,7 @@ const DesktopHeader = styled.div`
font-weight: 500; font-weight: 500;
padding: 8px; padding: 8px;
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
align-items: center; align-items: center;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -32,11 +32,11 @@ const MobileHeader = styled.div` ...@@ -32,11 +32,11 @@ const MobileHeader = styled.div`
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
display: none; display: none;
} }
@media screen and (max-width: ${MEDIA_WIDTHS.upToExtraSmall}px) { @media screen and (max-width: ${MEDIA_WIDTHS.deprecated_upToExtraSmall}px) {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: start; align-items: start;
...@@ -55,7 +55,7 @@ const ToggleLabel = styled.div` ...@@ -55,7 +55,7 @@ const ToggleLabel = styled.div`
` `
const MobileTogglePosition = styled.div` const MobileTogglePosition = styled.div`
@media screen and (max-width: ${MEDIA_WIDTHS.upToExtraSmall}px) { @media screen and (max-width: ${MEDIA_WIDTHS.deprecated_upToExtraSmall}px) {
position: absolute; position: absolute;
right: 20px; right: 20px;
} }
......
...@@ -48,11 +48,11 @@ const LinkRow = styled(Link)` ...@@ -48,11 +48,11 @@ const LinkRow = styled(Link)`
background-color: ${({ theme }) => theme.deprecated_bg2}; background-color: ${({ theme }) => theme.deprecated_bg2};
} }
@media screen and (min-width: ${MEDIA_WIDTHS.upToSmall}px) { @media screen and (min-width: ${MEDIA_WIDTHS.deprecated_upToSmall}px) {
/* flex-direction: row; */ /* flex-direction: row; */
} }
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-direction: column; flex-direction: column;
row-gap: 12px; row-gap: 12px;
`}; `};
...@@ -61,7 +61,7 @@ const LinkRow = styled(Link)` ...@@ -61,7 +61,7 @@ const LinkRow = styled(Link)`
const BadgeText = styled.div` const BadgeText = styled.div`
font-weight: 500; font-weight: 500;
font-size: 14px; font-size: 14px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 12px; font-size: 12px;
`}; `};
` `
...@@ -78,7 +78,7 @@ const RangeLineItem = styled(DataLineItem)` ...@@ -78,7 +78,7 @@ const RangeLineItem = styled(DataLineItem)`
margin-top: 4px; margin-top: 4px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
background-color: ${({ theme }) => theme.deprecated_bg2}; background-color: ${({ theme }) => theme.deprecated_bg2};
border-radius: 12px; border-radius: 12px;
padding: 8px 0; padding: 8px 0;
...@@ -88,7 +88,7 @@ const RangeLineItem = styled(DataLineItem)` ...@@ -88,7 +88,7 @@ const RangeLineItem = styled(DataLineItem)`
const DoubleArrow = styled.span` const DoubleArrow = styled.span`
margin: 0 2px; margin: 0 2px;
color: ${({ theme }) => theme.deprecated_text3}; color: ${({ theme }) => theme.deprecated_text3};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
margin: 4px; margin: 4px;
padding: 20px; padding: 20px;
`}; `};
...@@ -104,7 +104,7 @@ const ExtentsText = styled.span` ...@@ -104,7 +104,7 @@ const ExtentsText = styled.span`
color: ${({ theme }) => theme.deprecated_text3}; color: ${({ theme }) => theme.deprecated_text3};
font-size: 14px; font-size: 14px;
margin-right: 4px; margin-right: 4px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`}; `};
` `
...@@ -122,7 +122,7 @@ const DataText = styled.div` ...@@ -122,7 +122,7 @@ const DataText = styled.div`
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 14px; font-size: 14px;
`}; `};
` `
......
...@@ -13,7 +13,7 @@ import styled from 'styled-components/macro' ...@@ -13,7 +13,7 @@ import styled from 'styled-components/macro'
import { currencyId } from 'utils/currencyId' import { currencyId } from 'utils/currencyId'
const MobileWrapper = styled(AutoColumn)` const MobileWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`}; `};
` `
......
...@@ -23,7 +23,7 @@ const AddressText = styled(ThemedText.DeprecatedBlue)` ...@@ -23,7 +23,7 @@ const AddressText = styled(ThemedText.DeprecatedBlue)`
font-size: 12px; font-size: 12px;
word-break: break-all; word-break: break-all;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 10px; font-size: 10px;
`} `}
` `
......
...@@ -99,7 +99,7 @@ const MenuFlyout = styled.span<{ redesignFlag: boolean }>` ...@@ -99,7 +99,7 @@ const MenuFlyout = styled.span<{ redesignFlag: boolean }>`
z-index: 100; z-index: 100;
color: ${({ theme, redesignFlag }) => redesignFlag && theme.textPrimary}; color: ${({ theme, redesignFlag }) => redesignFlag && theme.textPrimary};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
min-width: 18.125rem; min-width: 18.125rem;
`}; `};
......
...@@ -95,7 +95,7 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean; ...@@ -95,7 +95,7 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean;
const SlippageEmojiContainer = styled.span` const SlippageEmojiContainer = styled.span`
color: #f3841e; color: #f3841e;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`} `}
` `
......
...@@ -30,7 +30,7 @@ const CheckIcon = styled(Check)` ...@@ -30,7 +30,7 @@ const CheckIcon = styled(Check)`
align-items: center; align-items: center;
justify-content: center; justify-content: center;
color: ${({ theme }) => theme.accentAction}; color: ${({ theme }) => theme.accentAction};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
align-items: flex-end; align-items: flex-end;
`}; `};
` `
...@@ -112,7 +112,7 @@ const IconWrapperDeprecated = styled.div<{ size?: number | null }>` ...@@ -112,7 +112,7 @@ const IconWrapperDeprecated = styled.div<{ size?: number | null }>`
height: ${({ size }) => (size ? size + 'px' : '24px')}; height: ${({ size }) => (size ? size + 'px' : '24px')};
width: ${({ size }) => (size ? size + 'px' : '24px')}; width: ${({ size }) => (size ? size + 'px' : '24px')};
} }
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
align-items: flex-end; align-items: flex-end;
`}; `};
` `
...@@ -127,7 +127,7 @@ const IconWrapper = styled.div<{ size?: number | null }>` ...@@ -127,7 +127,7 @@ const IconWrapper = styled.div<{ size?: number | null }>`
height: ${({ size }) => (size ? size + 'px' : '28px')}; height: ${({ size }) => (size ? size + 'px' : '28px')};
width: ${({ size }) => (size ? size + 'px' : '28px')}; width: ${({ size }) => (size ? size + 'px' : '28px')};
} }
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
align-items: flex-end; align-items: flex-end;
`}; `};
` `
......
...@@ -71,7 +71,7 @@ const HeaderRow = styled.div<{ redesignFlag?: boolean }>` ...@@ -71,7 +71,7 @@ const HeaderRow = styled.div<{ redesignFlag?: boolean }>`
font-weight: ${({ redesignFlag }) => (redesignFlag ? '600' : '500')}; font-weight: ${({ redesignFlag }) => (redesignFlag ? '600' : '500')};
size: ${({ redesignFlag }) => redesignFlag && '16px'}; size: ${({ redesignFlag }) => redesignFlag && '16px'};
color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.deprecated_primary1 : 'inherit')}; color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.deprecated_primary1 : 'inherit')};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
padding: 1rem; padding: 1rem;
`}; `};
` `
...@@ -82,7 +82,7 @@ const ContentWrapper = styled.div<{ redesignFlag?: boolean }>` ...@@ -82,7 +82,7 @@ const ContentWrapper = styled.div<{ redesignFlag?: boolean }>`
padding: 0 1rem 1rem 1rem; padding: 0 1rem 1rem 1rem;
border-bottom-left-radius: 20px; border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px; border-bottom-right-radius: 20px;
${({ theme }) => theme.mediaWidth.upToMedium`padding: 0 1rem 1rem 1rem`}; ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`padding: 0 1rem 1rem 1rem`};
` `
const UpperSection = styled.div` const UpperSection = styled.div`
...@@ -105,7 +105,7 @@ const UpperSection = styled.div` ...@@ -105,7 +105,7 @@ const UpperSection = styled.div`
const OptionGrid = styled.div` const OptionGrid = styled.div`
display: grid; display: grid;
grid-gap: 10px; grid-gap: 10px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
grid-template-columns: 1fr; grid-template-columns: 1fr;
grid-gap: 10px; grid-gap: 10px;
`}; `};
......
...@@ -26,7 +26,7 @@ const StatContainer = styled.div` ...@@ -26,7 +26,7 @@ const StatContainer = styled.div`
margin-bottom: 1rem; margin-bottom: 1rem;
margin-right: 1rem; margin-right: 1rem;
margin-left: 1rem; margin-left: 1rem;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`}; `};
` `
...@@ -57,7 +57,7 @@ const TopSection = styled.div` ...@@ -57,7 +57,7 @@ const TopSection = styled.div`
align-items: center; align-items: center;
padding: 1rem; padding: 1rem;
z-index: 1; z-index: 1;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
grid-template-columns: 48px 1fr 96px; grid-template-columns: 48px 1fr 96px;
`}; `};
` `
......
...@@ -67,7 +67,7 @@ const StyledPolling = styled.div` ...@@ -67,7 +67,7 @@ const StyledPolling = styled.div`
color: ${({ theme }) => theme.deprecated_text1}; color: ${({ theme }) => theme.deprecated_text1};
transition: 250ms ease color; transition: 250ms ease color;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
display: none; display: none;
`} `}
` `
......
...@@ -40,7 +40,7 @@ const StyledButtonEmpty = styled(ButtonEmpty)` ...@@ -40,7 +40,7 @@ const StyledButtonEmpty = styled(ButtonEmpty)`
const AddressText = styled(ThemedText.DeprecatedBlue)` const AddressText = styled(ThemedText.DeprecatedBlue)`
font-size: 12px; font-size: 12px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
font-size: 10px; font-size: 10px;
`} `}
` `
......
...@@ -154,7 +154,7 @@ export const ResponsiveTooltipContainer = styled(TooltipContainer)<{ origin?: st ...@@ -154,7 +154,7 @@ export const ResponsiveTooltipContainer = styled(TooltipContainer)<{ origin?: st
padding: 1rem; padding: 1rem;
width: ${({ width }) => width ?? 'auto'}; width: ${({ width }) => width ?? 'auto'};
${({ theme, origin }) => theme.mediaWidth.upToExtraSmall` ${({ theme, origin }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
transform: scale(0.8); transform: scale(0.8);
transform-origin: ${origin ?? 'top left'}; transform-origin: ${origin ?? 'top left'};
`} `}
......
...@@ -10,7 +10,7 @@ export const PageWrapper = styled(BodyWrapper)<{ wide: boolean }>` ...@@ -10,7 +10,7 @@ export const PageWrapper = styled(BodyWrapper)<{ wide: boolean }>`
padding: ${({ wide }) => (wide ? '10px' : '0')}; padding: ${({ wide }) => (wide ? '10px' : '0')};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
max-width: 480px; max-width: 480px;
`}; `};
` `
...@@ -20,11 +20,11 @@ export const Wrapper = styled.div` ...@@ -20,11 +20,11 @@ export const Wrapper = styled.div`
padding: 26px 16px; padding: 26px 16px;
min-width: 480px; min-width: 480px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
min-width: 400px; min-width: 400px;
`}; `};
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
min-width: 340px; min-width: 340px;
`}; `};
` `
...@@ -33,7 +33,7 @@ export const ScrollablePage = styled.div` ...@@ -33,7 +33,7 @@ export const ScrollablePage = styled.div`
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
max-width: 480px; max-width: 480px;
margin: 0 auto; margin: 0 auto;
padding: 0px 8px; padding: 0px 8px;
...@@ -69,7 +69,7 @@ export const ResponsiveTwoColumns = styled.div<{ wide: boolean }>` ...@@ -69,7 +69,7 @@ export const ResponsiveTwoColumns = styled.div<{ wide: boolean }>`
border-top: 1px solid ${({ theme }) => theme.deprecated_bg2}; border-top: 1px solid ${({ theme }) => theme.deprecated_bg2};
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
grid-template-columns: 1fr; grid-template-columns: 1fr;
margin-top: 0; margin-top: 0;
...@@ -81,7 +81,7 @@ export const RightContainer = styled(AutoColumn)` ...@@ -81,7 +81,7 @@ export const RightContainer = styled(AutoColumn)`
grid-column: 2; grid-column: 2;
height: fit-content; height: fit-content;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
grid-row: 2 / 3; grid-row: 2 / 3;
grid-column: 1; grid-column: 1;
`}; `};
...@@ -99,7 +99,7 @@ export const StackedItem = styled.div<{ zIndex?: number }>` ...@@ -99,7 +99,7 @@ export const StackedItem = styled.div<{ zIndex?: number }>`
` `
export const MediumOnly = styled.div` export const MediumOnly = styled.div`
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
display: none; display: none;
`}; `};
` `
...@@ -107,7 +107,7 @@ export const MediumOnly = styled.div` ...@@ -107,7 +107,7 @@ export const MediumOnly = styled.div`
export const HideMedium = styled.div` export const HideMedium = styled.div`
display: none; display: none;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
display: block; display: block;
`}; `};
` `
...@@ -61,7 +61,7 @@ const BodyWrapper = styled.div<{ navBarFlag: NavBarVariant }>` ...@@ -61,7 +61,7 @@ const BodyWrapper = styled.div<{ navBarFlag: NavBarVariant }>`
padding: ${({ navBarFlag }) => (navBarFlag === NavBarVariant.Enabled ? `72px 0px 0px 0px` : `120px 0px 0px 0px`)}; padding: ${({ navBarFlag }) => (navBarFlag === NavBarVariant.Enabled ? `72px 0px 0px 0px` : `120px 0px 0px 0px`)};
align-items: center; align-items: center;
flex: 1; flex: 1;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 52px 0px 16px 0px; padding: 52px 0px 16px 0px;
`}; `};
` `
......
...@@ -34,7 +34,7 @@ import { ProposalEditor } from './ProposalEditor' ...@@ -34,7 +34,7 @@ import { ProposalEditor } from './ProposalEditor'
import { ProposalSubmissionModal } from './ProposalSubmissionModal' import { ProposalSubmissionModal } from './ProposalSubmissionModal'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
......
...@@ -31,7 +31,7 @@ import { currencyId } from '../../utils/currencyId' ...@@ -31,7 +31,7 @@ import { currencyId } from '../../utils/currencyId'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
...@@ -84,7 +84,7 @@ const DataRow = styled(RowBetween)` ...@@ -84,7 +84,7 @@ const DataRow = styled(RowBetween)`
justify-content: center; justify-content: center;
gap: 12px; gap: 12px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
`}; `};
......
...@@ -17,7 +17,7 @@ import { Countdown } from './Countdown' ...@@ -17,7 +17,7 @@ import { Countdown } from './Countdown'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
...@@ -37,7 +37,7 @@ const PoolSection = styled.div` ...@@ -37,7 +37,7 @@ const PoolSection = styled.div`
` `
const DataRow = styled(RowBetween)` const DataRow = styled(RowBetween)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-direction: column; flex-direction: column;
`}; `};
` `
......
...@@ -13,7 +13,7 @@ const CTASection = styled.section` ...@@ -13,7 +13,7 @@ const CTASection = styled.section`
gap: 8px; gap: 8px;
opacity: 0.8; opacity: 0.8;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
grid-template-columns: auto; grid-template-columns: auto;
grid-template-rows: auto; grid-template-rows: auto;
`}; `};
...@@ -75,7 +75,7 @@ const HeaderText = styled(ThemedText.DeprecatedLabel)` ...@@ -75,7 +75,7 @@ const HeaderText = styled(ThemedText.DeprecatedLabel)`
font-weight: 400; font-weight: 400;
font-size: 16px; font-size: 16px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
font-size: 16px; font-size: 16px;
`}; `};
` `
...@@ -85,7 +85,7 @@ const ResponsiveColumn = styled(AutoColumn)` ...@@ -85,7 +85,7 @@ const ResponsiveColumn = styled(AutoColumn)`
width: 100%; width: 100%;
gap: 8px; gap: 8px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
gap: 8px; gap: 8px;
`}; `};
justify-content: space-between; justify-content: space-between;
......
...@@ -52,12 +52,12 @@ const PageWrapper = styled.div` ...@@ -52,12 +52,12 @@ const PageWrapper = styled.div`
min-width: 800px; min-width: 800px;
max-width: 960px; max-width: 960px;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
min-width: 680px; min-width: 680px;
max-width: 680px; max-width: 680px;
`}; `};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
min-width: 600px; min-width: 600px;
max-width: 600px; max-width: 600px;
`}; `};
...@@ -67,7 +67,7 @@ const PageWrapper = styled.div` ...@@ -67,7 +67,7 @@ const PageWrapper = styled.div`
max-width: 500px; max-width: 500px;
} }
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
min-width: 340px; min-width: 340px;
max-width: 340px; max-width: 340px;
`}; `};
...@@ -110,7 +110,7 @@ const DoubleArrow = styled.span` ...@@ -110,7 +110,7 @@ const DoubleArrow = styled.span`
margin: 0 1rem; margin: 0 1rem;
` `
const ResponsiveRow = styled(RowBetween)` const ResponsiveRow = styled(RowBetween)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
row-gap: 16px; row-gap: 16px;
...@@ -122,7 +122,7 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)` ...@@ -122,7 +122,7 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)`
border-radius: 12px; border-radius: 12px;
padding: 6px 8px; padding: 6px 8px;
width: fit-content; width: fit-content;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex: 1 1 auto; flex: 1 1 auto;
width: 49%; width: 49%;
`}; `};
......
...@@ -28,18 +28,18 @@ const PageWrapper = styled(AutoColumn)` ...@@ -28,18 +28,18 @@ const PageWrapper = styled(AutoColumn)`
max-width: 870px; max-width: 870px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToMedium` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
max-width: 800px; max-width: 800px;
padding: 0px 8px; padding: 0px 8px;
`}; `};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
max-width: 500px; max-width: 500px;
`}; `};
` `
const TitleRow = styled(RowBetween)` const TitleRow = styled(RowBetween)`
color: ${({ theme }) => theme.deprecated_text2}; color: ${({ theme }) => theme.deprecated_text2};
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-wrap: wrap; flex-wrap: wrap;
gap: 12px; gap: 12px;
width: 100%; width: 100%;
...@@ -50,7 +50,7 @@ const ButtonRow = styled(RowFixed)` ...@@ -50,7 +50,7 @@ const ButtonRow = styled(RowFixed)`
margin-left: 8px; margin-left: 8px;
} }
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
width: 100%; width: 100%;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
...@@ -59,7 +59,7 @@ const ButtonRow = styled(RowFixed)` ...@@ -59,7 +59,7 @@ const ButtonRow = styled(RowFixed)`
` `
const Menu = styled(NewMenu)` const Menu = styled(NewMenu)`
margin-left: 0; margin-left: 0;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex: 1 1 auto; flex: 1 1 auto;
width: 49%; width: 49%;
right: 0px; right: 0px;
...@@ -118,7 +118,7 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)` ...@@ -118,7 +118,7 @@ const ResponsiveButtonPrimary = styled(ButtonPrimary)`
border-radius: 12px; border-radius: 12px;
padding: 6px 8px; padding: 6px 8px;
width: fit-content; width: fit-content;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex: 1 1 auto; flex: 1 1 auto;
width: 100%; width: 100%;
`}; `};
......
...@@ -19,7 +19,7 @@ export const MaxButton = styled.button<{ width: string }>` ...@@ -19,7 +19,7 @@ export const MaxButton = styled.button<{ width: string }>`
border: 1px solid ${({ theme }) => theme.deprecated_primary5}; border: 1px solid ${({ theme }) => theme.deprecated_primary5};
border-radius: 0.5rem; border-radius: 0.5rem;
font-size: 1rem; font-size: 1rem;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0.25rem 0.5rem; padding: 0.25rem 0.5rem;
`}; `};
font-weight: 500; font-weight: 500;
......
...@@ -30,7 +30,7 @@ const PageWrapper = styled(AutoColumn)` ...@@ -30,7 +30,7 @@ const PageWrapper = styled(AutoColumn)`
max-width: 640px; max-width: 640px;
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
...@@ -41,7 +41,7 @@ const VoteCard = styled(DataCard)` ...@@ -41,7 +41,7 @@ const VoteCard = styled(DataCard)`
` `
const TitleRow = styled(RowBetween)` const TitleRow = styled(RowBetween)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-wrap: wrap; flex-wrap: wrap;
gap: 12px; gap: 12px;
width: 100%; width: 100%;
...@@ -51,7 +51,7 @@ const TitleRow = styled(RowBetween)` ...@@ -51,7 +51,7 @@ const TitleRow = styled(RowBetween)`
const ButtonRow = styled(RowFixed)` const ButtonRow = styled(RowFixed)`
gap: 8px; gap: 8px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
width: 100%; width: 100%;
flex-direction: row-reverse; flex-direction: row-reverse;
justify-content: space-between; justify-content: space-between;
...@@ -61,14 +61,14 @@ const ButtonRow = styled(RowFixed)` ...@@ -61,14 +61,14 @@ const ButtonRow = styled(RowFixed)`
const ResponsiveButtonPrimary = styled(ButtonPrimary)` const ResponsiveButtonPrimary = styled(ButtonPrimary)`
width: fit-content; width: fit-content;
border-radius: 12px; border-radius: 12px;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
width: 48%; width: 48%;
`}; `};
` `
const ResponsiveButtonSecondary = styled(ButtonSecondary)` const ResponsiveButtonSecondary = styled(ButtonSecondary)`
width: fit-content; width: fit-content;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
width: 48%; width: 48%;
`}; `};
` `
......
...@@ -7,7 +7,7 @@ export const Wrapper = styled.div` ...@@ -7,7 +7,7 @@ export const Wrapper = styled.div`
padding: 20px; padding: 20px;
min-width: 460px; min-width: 460px;
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
min-width: 340px; min-width: 340px;
`}; `};
` `
...@@ -19,7 +19,7 @@ export const SmallMaxButton = styled(MaxButton)` ...@@ -19,7 +19,7 @@ export const SmallMaxButton = styled(MaxButton)`
export const ResponsiveHeaderText = styled(Text)` export const ResponsiveHeaderText = styled(Text)`
font-size: 40px; font-size: 40px;
font-weight: 500; font-weight: 500;
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
font-size: 24px font-size: 24px
`}; `};
` `
...@@ -33,7 +33,7 @@ import { UNI } from '../../constants/tokens' ...@@ -33,7 +33,7 @@ import { UNI } from '../../constants/tokens'
import { ProposalStatus } from './styled' import { ProposalStatus } from './styled'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
...@@ -86,7 +86,7 @@ const VoteCard = styled(DataCard)` ...@@ -86,7 +86,7 @@ const VoteCard = styled(DataCard)`
const WrapSmall = styled(RowBetween)` const WrapSmall = styled(RowBetween)`
margin-bottom: 1rem; margin-bottom: 1rem;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
flex-wrap: wrap; flex-wrap: wrap;
`}; `};
` `
......
...@@ -57,7 +57,7 @@ import { ProposalStatus } from './styled' ...@@ -57,7 +57,7 @@ import { ProposalStatus } from './styled'
const PageWrapper = styled(AutoColumn)` const PageWrapper = styled(AutoColumn)`
width: 100%; width: 100%;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
padding: 0px 8px; padding: 0px 8px;
`}; `};
` `
...@@ -123,7 +123,7 @@ const MarkDownWrapper = styled.div` ...@@ -123,7 +123,7 @@ const MarkDownWrapper = styled.div`
` `
const WrapSmall = styled(RowBetween)` const WrapSmall = styled(RowBetween)`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
align-items: flex-start; align-items: flex-start;
flex-direction: column; flex-direction: column;
`}; `};
......
...@@ -430,20 +430,20 @@ export const CustomLightSpinner = styled(Spinner)<{ size: string }>` ...@@ -430,20 +430,20 @@ export const CustomLightSpinner = styled(Spinner)<{ size: string }>`
` `
export const HideSmall = styled.span` export const HideSmall = styled.span`
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: none; display: none;
`}; `};
` `
export const HideExtraSmall = styled.span` export const HideExtraSmall = styled.span`
${({ theme }) => theme.mediaWidth.upToExtraSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToExtraSmall`
display: none; display: none;
`}; `};
` `
export const SmallOnly = styled.span` export const SmallOnly = styled.span`
display: none; display: none;
${({ theme }) => theme.mediaWidth.upToSmall` ${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToSmall`
display: block; display: block;
`}; `};
` `
......
...@@ -21,10 +21,19 @@ export * from './components' ...@@ -21,10 +21,19 @@ export * from './components'
type TextProps = Omit<TextPropsOriginal, 'css'> type TextProps = Omit<TextPropsOriginal, 'css'>
export const MEDIA_WIDTHS = { export const MEDIA_WIDTHS = {
upToExtraSmall: 500, deprecated_upToExtraSmall: 500,
upToSmall: 720, deprecated_upToSmall: 720,
upToMedium: 960, deprecated_upToMedium: 960,
upToLarge: 1280, deprecated_upToLarge: 1280,
}
const BREAKPOINTS = {
sm: 640,
md: 768,
lg: 1024,
xl: 1280,
xxl: 1536,
xxxl: 1920,
} }
// Migrating to a standard z-index system https://getbootstrap.com/docs/5.0/layout/z-index/ // Migrating to a standard z-index system https://getbootstrap.com/docs/5.0/layout/z-index/
...@@ -42,17 +51,16 @@ export enum Z_INDEX { ...@@ -42,17 +51,16 @@ export enum Z_INDEX {
tooltip = 1080, tooltip = 1080,
} }
const mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys(MEDIA_WIDTHS).reduce( const deprecated_mediaWidthTemplates: { [width in keyof typeof MEDIA_WIDTHS]: typeof css } = Object.keys(
(accumulator, size) => { MEDIA_WIDTHS
;(accumulator as any)[size] = (a: any, b: any, c: any) => css` ).reduce((accumulator, size) => {
@media (max-width: ${(MEDIA_WIDTHS as any)[size]}px) { ;(accumulator as any)[size] = (a: any, b: any, c: any) => css`
${css(a, b, c)} @media (max-width: ${(MEDIA_WIDTHS as any)[size]}px) {
} ${css(a, b, c)}
` }
return accumulator `
}, return accumulator
{} }, {}) as any
) as any
const deprecated_white = ColorsPalette.white const deprecated_white = ColorsPalette.white
const deprecated_black = ColorsPalette.black const deprecated_black = ColorsPalette.black
...@@ -257,7 +265,10 @@ function getTheme(darkMode: boolean, isNewColorsEnabled: boolean): DefaultTheme ...@@ -257,7 +265,10 @@ function getTheme(darkMode: boolean, isNewColorsEnabled: boolean): DefaultTheme
shadow1: darkMode ? '#000' : '#2F80ED', shadow1: darkMode ? '#000' : '#2F80ED',
// media queries // media queries
mediaWidth: mediaWidthTemplates, deprecated_mediaWidth: deprecated_mediaWidthTemplates,
//breakpoints
breakpoint: BREAKPOINTS,
// css snippets // css snippets
flexColumnNoWrap: css` flexColumnNoWrap: css`
......
...@@ -127,11 +127,20 @@ declare module 'styled-components/macro' { ...@@ -127,11 +127,20 @@ declare module 'styled-components/macro' {
shadow1: Color shadow1: Color
// media queries // media queries
mediaWidth: { deprecated_mediaWidth: {
upToExtraSmall: ThemedCssFunction<DefaultTheme> deprecated_upToExtraSmall: ThemedCssFunction<DefaultTheme>
upToSmall: ThemedCssFunction<DefaultTheme> deprecated_upToSmall: ThemedCssFunction<DefaultTheme>
upToMedium: ThemedCssFunction<DefaultTheme> deprecated_upToMedium: ThemedCssFunction<DefaultTheme>
upToLarge: ThemedCssFunction<DefaultTheme> deprecated_upToLarge: ThemedCssFunction<DefaultTheme>
}
breakpoint: {
sm: number
md: number
lg: number
xl: number
xxl: number
xxxl: number
} }
// css snippets // css snippets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment