mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-24 17:03:47 +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 { get } from 'lodash';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import { refreshScreenWidth } from 'providers/ReduxStore/slices/app';
|
||||
import ConfirmAppClose from './ConfirmAppClose';
|
||||
@ -18,6 +19,13 @@ export const AppProvider = (props) => {
|
||||
dispatch(refreshScreenWidth());
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const platform = get(navigator, 'platform', '');
|
||||
if(platform && platform.toLowerCase().indexOf('mac') > -1) {
|
||||
document.body.classList.add('os-mac');
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const handleResize = () => {
|
||||
dispatch(refreshScreenWidth());
|
||||
|
@ -58,9 +58,12 @@ body::-webkit-scrollbar-thumb,
|
||||
border-radius: 5rem;
|
||||
}
|
||||
|
||||
* {
|
||||
/* This ensures that scrollbars are only visible when the user starts to scroll,
|
||||
providing a cleaner and more minimalistic appearance. */
|
||||
/*
|
||||
* Mac-specific scrollbar styling
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user