overhangio / tutor-indigo

An elegant, customizable theme for Open edX
GNU Affero General Public License v3.0
74 stars 276 forks source link

Fix for safari desktop #7

Closed waveywhite closed 4 years ago

waveywhite commented 4 years ago

On Safari for Macos the user menu is clipped due to a Safari bug. If you set both overflow:hidden and position:fixed on a parent element, a child element with position: fixed will incorrectly be clipped by the parent element. The fix for this is to remove overflow:visible on large screens, where it isn't required anyway.

regisb commented 4 years ago

Thanks for your contribution @waveywhite! Can you please add screenshots before/after the change? Also, could you link to the upstream Safari bug report that you mentioned?

Sigurd-Borge commented 3 years ago

Hey,

Unfortunately position: fixed causes loss of the "preview-menu" in at least Safari, Chrome and Firefox on Mac for me. This is the menu that course staff/administrators use to see the course as Staff, Learner, Specific Learner and Learner in Audit.

Demo instance as admin today:

image

Without position: fixed the menu overlays the proper header due to this PR:

image

Reverting this change and removing the position: fixed which is specific to this theme and not in the original theme gets the menu back to the original position. Example from my local instance running "openedx theme":

image

I don't know why position: fixed was added to the global-header class to begin with so I haven't put in a PR to reverse either of these two things. Obviously if desired I can do so.

For what it's worth the original theme has position: relative overflow: hidden for the global-header.

On my local instance I removed position: fixed and changed to overflow: hidden and rebuilt my openedx image and that returned the menu to the expected position for me without any negative consequences that I have found so far as either admin or learner.

image
regisb commented 3 years ago

@Doppern I realise the problem. Can you please create a Github issue linking to your comment? Oh and if you could create a PR that would be the cherry on the cake :cherries: :cake: :-)

Sigurd-Borge commented 3 years ago

@regisb done :)