mirror of
https://github.com/usebruno/bruno.git
synced 2025-02-16 09:50:17 +01:00
feat: mac specific os styling
This commit is contained in:
parent
911e3aa589
commit
eb1c10fd6e
@ -1,4 +1,5 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import { get } from 'lodash';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { refreshScreenWidth } from 'providers/ReduxStore/slices/app';
|
import { refreshScreenWidth } from 'providers/ReduxStore/slices/app';
|
||||||
import ConfirmAppClose from './ConfirmAppClose';
|
import ConfirmAppClose from './ConfirmAppClose';
|
||||||
@ -18,6 +19,13 @@ export const AppProvider = (props) => {
|
|||||||
dispatch(refreshScreenWidth());
|
dispatch(refreshScreenWidth());
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const platform = get(navigator, 'platform', '');
|
||||||
|
if(platform && platform.toLowerCase().indexOf('mac') > -1) {
|
||||||
|
document.body.classList.add('os-mac');
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleResize = () => {
|
const handleResize = () => {
|
||||||
dispatch(refreshScreenWidth());
|
dispatch(refreshScreenWidth());
|
||||||
|
@ -58,9 +58,12 @@ body::-webkit-scrollbar-thumb,
|
|||||||
border-radius: 5rem;
|
border-radius: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
/*
|
||||||
/* This ensures that scrollbars are only visible when the user starts to scroll,
|
* Mac-specific scrollbar styling
|
||||||
providing a cleaner and more minimalistic appearance. */
|
* This ensures that scrollbars are only visible when the user starts to scroll,
|
||||||
|
* providing a cleaner and more minimalistic appearance.
|
||||||
|
*/
|
||||||
|
body.os-mac * {
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user