Skip to content

Commit

Permalink
refactor(css): rm un-need flex-wrap property
Browse files Browse the repository at this point in the history
  • Loading branch information
mydearxym committed Sep 23, 2023
1 parent c9ffcc8 commit d5a8f37
Show file tree
Hide file tree
Showing 53 changed files with 59 additions and 105 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export const Value = styled.div`
`

export const UserList = styled.div`
${css.column()};
flex-wrap: wrap;
${css.columnWrap()};
gap: 10px 0;
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export const FeatList = styled.div`
`

export const MobileIntroLists = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 16px 0;
padding-left: 10px;
margin-top: -25px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import TreesSVG from '@/icons/Trees'
export const Wrapper = styled.div.attrs<TTestable>(({ testid }) => ({
'data-test-id': testid,
}))<TTestable>`
${css.row('align-both')};
flex-wrap: wrap;
${css.rowWrap('align-both')};
gap: 40px 25px;
height: auto;
margin-top: 80px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ export const CADBackground = styled(Img)`
`};
`
export const TechsWrapper = styled.div`
${css.row('align-both')};
flex-wrap: wrap;
${css.rowWrap('align-both')};
gap: 15px 50px;
height: 440px;
width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import styled from 'styled-components'
import css, { theme } from '@/css'

export const Wrapper = styled.div`
${css.row('align-center')};
${css.rowWrap('align-center')};
margin-top: 10px;
color: ${theme('banner.desc')};
flex-wrap: wrap;
`

export const Text = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export const Wrapper = styled.div`
`
export const InnerWrapper = styled.div`
width: calc(100% + 148px);
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 16px 0;
`
export const InnerWrapperColumn = styled.div`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const Wrapper = styled.div`
`
export const Block = styled.div`
${css.size(48)};
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 3px;
padding: 4px;
border-radius: 2px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const Wrapper = styled.div`
`
export const Block = styled.div`
${css.size(47)};
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
border-radius: 2px;
border: 1px solid;
border-color: ${theme('divider')};
Expand Down
3 changes: 1 addition & 2 deletions src/containers/editor/PassportEditor/styles/selects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import CheckSVG from '@/icons/Check'

export const Wrapper = styled.div`
width: 100%;
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 10px 0;
position: relative;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import css, { animate, theme } from '@/css'
import PenSVG from '@/icons/EditPen'

export const Wrapper = styled.div`
${css.row()};
${css.rowWrap()};
width: calc(100% + 30px);
flex-wrap: wrap;
gap: 0 12px;
margin-top: 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import CheckedSVG from '@/icons/CheckBold'
import CircleArrowSVG from '@/icons/CircleArrow'

export const Wrapper = styled.div<{ showMore: boolean }>`
${css.row()};
${css.rowWrap()};
width: calc(100% + 30px);
flex-wrap: wrap;
gap: 15px 16px;
margin-top: 10px;
position: relative;
Expand Down
3 changes: 1 addition & 2 deletions src/containers/thread/AboutThread/styles/extra_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import styled from 'styled-components'
import css, { theme } from '@/css'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
height: auto;
width: 600px;
padding-top: 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export const Wrapper = styled.div`
margin-top: 10px;
`
export const CatsWrapper = styled.div`
${css.row('justify-start')};
flex-wrap: wrap;
${css.rowWrap('justify-start')};
gap: 15px 20px;
flex-grow: 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export const PlusIcon = styled(PlusSVG)`
margin-right: 6px;
`
export const LinkGroup = styled.div`
${css.row('justify-start')};
flex-wrap: wrap;
${css.rowWrap('justify-start')};
width: calc(100% + 50px);
gap: 30px;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ export const PlusIcon = styled(PlusSVG)`
`

export const LinkGroup = styled.div`
${css.row('justify-start')};
${css.rowWrap('justify-start')};
margin-top: 30px;
flex-wrap: wrap;
width: calc(100% + 50px);
gap: 30px;
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export const FlatLayoutWrapper = styled.div`
width: 100%;
`
export const FlatLists = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 22px 0;
width: 100%;
margin-top: 15px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import ToolSVG from '@/icons/Heart'
export { Bar, Circle } from '..'

export const CardssLayoutWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 10px;
width: 100%;
`
Expand All @@ -26,8 +25,7 @@ export const FooterMore = styled.div`
width: 80%;
`
export const BlocksLayoutWrapper = styled.div<{ withDivider?: boolean }>`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
gap: 22px 0;
border-right: ${({ withDivider }) => (withDivider ? '1px solid' : 'none')};
border-right-color: ${theme('divider')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import styled from 'styled-components'
import css, { theme } from '@/css'

export const Wrapper = styled.div`
${css.row('justify-between')};
flex-wrap: wrap;
${css.rowWrap('justify-between')};
border-left: 2px solid;
border-left-color: ${theme('divider')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ export const TheColor = styled.div<{ color: TColorName }>`

// threads
export const ThreadsWrapper = styled.div`
${css.row('justify-between')};
flex-wrap: wrap;
${css.rowWrap('justify-between')};
border: 1px solid;
border-color: ${theme('divider')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const Wrapper = styled.div<{ bannerLayout: TBannerLayout }>`
: 'width: auto;'}
`
export const CatsWrapper = styled(MainWrapper)`
${css.row('justify-between')};
flex-wrap: wrap;
${css.rowWrap('justify-between')};
flex-grow: 1;
width: 100%;
Expand Down
3 changes: 1 addition & 2 deletions src/containers/thread/DocThread/styles/cards_layout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export const Wrapper = styled.div`
margin-left: -30px;
`
export const CatsWrapper = styled(MainWrapper)`
${css.row('justify-between')};
flex-wrap: wrap;
${css.rowWrap('justify-between')};
flex-grow: 1;
gap: 20px 10px;
Expand Down
3 changes: 1 addition & 2 deletions src/containers/tool/ArticleSticker/styles/comment_sticker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ export const TotalNum = styled.span<{ highlight: boolean }>`
margin-right: 4px;
`
export const UsersWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
export const Avatar = styled(Img)`
${css.circle(20)};
Expand Down
3 changes: 1 addition & 2 deletions src/containers/tool/CollectionFolder/styles/setter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ export const Artiment = styled.div`
margin-right: 5px;
`
export const ListWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
flex-grow: 1;
padding-top: 35px;
padding-right: 15px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ export const Wrapper = styled.div`
min-height: 400px;
`
export const InnerWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export const Wrapper = styled.div`
margin-bottom: 8px;
`
export const InnerWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
export const HintTitle = styled.div<{ highlight: boolean }>`
font-size: 13px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ export const Wrapper = styled.div`
min-height: 300px;
`
export const InnerWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export const Wrapper = styled.div`
margin-bottom: 8px;
`
export const InnerWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
export const HintTitle = styled.div`
font-size: 13px;
Expand Down
3 changes: 1 addition & 2 deletions src/containers/tool/Share/styles/panel/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export const Article = styled.div`
margin-right: 5px;
`
export const InnerWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
${css.media.mobile`
justify-content: space-between;
Expand Down
3 changes: 1 addition & 2 deletions src/containers/user/UserLister/styles/list/normal_layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import css, { theme } from '@/css'
import CitySVG from '@/icons/City'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`

export const UserWrapper = styled.div`
Expand Down
3 changes: 1 addition & 2 deletions src/containers/user/UserLister/styles/user_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import Img from '@/Img'
import css, { theme } from '@/css'

export const TableWrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
`
// background: ${theme('drawer.articleBg')};

Expand Down
3 changes: 1 addition & 2 deletions src/widgets/ArticlesFilter/styles/selected_filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import styled from 'styled-components'
import css from '@/css'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
margin-left: 15px;
margin-top: -1px;
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/ContributorList/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import css from '@/css'
import Img from '@/Img'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
margin-top: 15px;
`
export const AvatarLink = styled.a``
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/FaIcons/styles/panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export const Title = styled.div`
`

export const ColorWrapper = styled.div`
${css.row('align-both')};
flex-wrap: wrap;
${css.rowWrap('align-both')};
margin-top: 8px;
padding-bottom: 14px;
gap: 6px 10px;
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/FaqList/styles/flat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const BrandText = styled.div<{ large: boolean }>`
`};
`
export const Content = styled.div<{ large: boolean }>`
${css.row('justify-between')};
flex-wrap: wrap;
${css.rowWrap('justify-between')};
gap: ${({ large }) => (large ? '45px' : '50px')};
${css.media.mobile`
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/GalleryHub/styles/directory_gallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import Img from '@/Img'
import css, { theme } from '@/css'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
color: ${theme('article.digest')};
width: 100%;
`
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/GalleryHub/styles/friends_gallery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ export const Wrapper = styled.div`
${css.column('align-center')};
`
export const BlockWrapper = styled.div`
${css.row('justify-start')};
flex-wrap: wrap;
${css.rowWrap('justify-start')};
color: ${theme('article.digest')};
width: 100%;
min-height: 500px;
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/GalleryHub/styles/image_gallery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ export const Wrapper = styled.div`
`
// GalleryWrapper base
export const WrapperBase = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
color: ${theme('article.digest')};
width: 100%;
`
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/GalleryHub/styles/inline_tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import styled from 'styled-components'
import css from '@/css'

export const Wrapper = styled.div`
${css.row()};
flex-wrap: wrap;
${css.rowWrap()};
margin-top: 18px;
`
export const Tag = styled.div`
Expand Down
Loading

0 comments on commit d5a8f37

Please sign in to comment.