Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit1fe56af

Browse files
committed
refactor(debug): see how scrollbar works on windows
1 parentfa88fa1 commit1fe56af

File tree

5 files changed

+56
-15
lines changed

5 files changed

+56
-15
lines changed

‎containers/ThemeWrapper/GlobalStyle.js‎

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import{createGlobalStyle}from'styled-components'
1+
import{createGlobalStyle,css}from'styled-components'
22
import{theme,cs}from'@utils'
33
importnormalizefrom'./normalize'
44

@@ -18,7 +18,7 @@ const GlobalStyle = createGlobalStyle`
1818
body {
1919
${cs.media.mobile`
2020
position: relative;
21-
`};
21+
`};
2222
}
2323
*::-moz-selection {
2424
background-color:${theme('selectionBg')} !important;
@@ -138,6 +138,33 @@ const GlobalStyle = createGlobalStyle`
138138
padding: 0 1px;
139139
color:${theme('searchHighlight.doramonFg')};
140140
}
141+
142+
${({ isMacOS})=>
143+
isMacOS||
144+
css`
145+
::-webkit-scrollbar {
146+
background: transparent;
147+
width: 4px;
148+
}
149+
::-webkit-scrollbar-button {
150+
background: transparent;
151+
}
152+
::-webkit-scrollbar-track {
153+
background: transparent;
154+
}
155+
::-webkit-scrollbar-track-piece {
156+
background: transparent;
157+
}
158+
::-webkit-scrollbar-thumb {
159+
background:${theme('banner.title')};
160+
}
161+
::-webkit-scrollbar-corner {
162+
background: grey;
163+
}
164+
::-webkit-resizer {
165+
background: grey;
166+
}
167+
`};
141168
`
142169

143170
exportdefaultGlobalStyle

‎containers/ThemeWrapper/index.js‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,32 @@ import { ThemeProvider } from 'styled-components'
99
importHelmetfrom'react-helmet'
1010

1111
import{connectStore}from'@utils'
12+
import{usePlatform}from'@hooks'
1213

1314
// import MarkDownStyle from './MarkDownStyle'
1415
importCodeSyxHighlightfrom'./CodeSyxHighlight'
1516
importAntUIOverWritefrom'./AntUIOverWrite'
1617
importGlobalStylefrom'./GlobalStyle'
1718

18-
constThemeContainer=({ children,theme:{ themeData}})=>(
19-
<ThemeProvidertheme={themeData}>
20-
<React.Fragment>
21-
<Helmetmeta={[{name:'theme-color',content:themeData.mobileTab}]}/>
22-
<div>{children}</div>
23-
<CodeSyxHighlight/>
24-
<AntUIOverWrite/>
25-
<GlobalStyle/>
26-
</React.Fragment>
27-
</ThemeProvider>
28-
)
19+
constThemeContainer=({ children,theme:{ themeData}})=>{
20+
const{ isMacOS}=usePlatform()
21+
22+
console.log('isMacOS: ',isMacOS)
23+
24+
return(
25+
<ThemeProvidertheme={themeData}>
26+
<React.Fragment>
27+
<Helmet
28+
meta={[{name:'theme-color',content:themeData.mobileTab}]}
29+
/>
30+
<div>{children}</div>
31+
<CodeSyxHighlight/>
32+
<AntUIOverWrite/>
33+
<GlobalStyleisMacOS={isMacOS}/>
34+
</React.Fragment>
35+
</ThemeProvider>
36+
)
37+
}
2938

3039
exportdefaultconnectStore(ThemeContainer)
3140

‎containers/UserLister/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const UserListerContainer = ({ userLister }) => {
6464

6565
return(
6666
<Modalwidth="700px"show={show}showCloseBtnonClose={onClose}>
67-
<Wrapper>
67+
<Wrapperid="userlist-scroller">
6868
<HeaderInfo
6969
type={type}
7070
brief={brief}

‎containers/UserLister/logic.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ export const useInit = _store => {
167167
// log('effect init')
168168
sub$=sr71$.data().subscribe($solver(DataSolver,ErrSolver))
169169

170+
/* eslint-disable no-undef */
171+
// OverlayScrollbars(document.getElementById('userlist-scroller'), {})
172+
170173
return()=>{
171174
// log('effect uninit')
172175
sr71$.stop()

‎containers/UserLister/styles/index.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import styled from 'styled-components'
33
// import Img from '@components/Img'
44
import{cs}from'@utils'
55

6-
exportconstWrapper=styled.div`
6+
exportconstWrapper=styled.div.attrs(({ id})=>({
7+
id,
8+
}))`
79
padding: 20px;
810
`
911
exportconstMsgWrapper=styled.div`

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp