Skip to content

Conversation

@microbit-henry
Copy link
Contributor

@microbit-henry microbit-henry commented Oct 23, 2019

Currently, the beta options and help buttons are too high on firefox on mac and are too low on IE11. In addition to this, the small icons are too high in all windows browsers. This PR fixes that by adding the class 'windowsroundsymbol' to all divs with the class 'roundsymbol' and changing the line-height of the small-icons if the python editor is opened in a windows browser. In style.css the line-height of all divs with the class 'windowsroundsymbol' is changed when in firefox.
Screenshot of buttons before:
MacOS Firefox:
Mac Firefox High Buttons

IE11:
IE11 low buttons

Screenshots of buttons after:
Chrome
Chrome

IE10
IE10

IE11
IE11

MacOS Firefox
Mac-Firefox

Safari
Safari

Windows 7 Firefox
Win7-Firefox

if(navigator.platform.match('Win') !== null){
$(".roundsymbol").addClass("windowsroundsymbol");
$("#small-icons .status-icon").css("line-height","2.2rem");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that could be done in CSS only? I'd rather only have JS doing this kind of thing as a last resort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesnt look like I can do this exact thing in CSS.
Screenshot 2019-10-24 11 05 50
I can spend some time looking into a different solution to just changing line height in different browsers if you want?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in what situation exactly do we need this change? Right now this would affect all browsers not on Windows?

python-main.js Outdated
Comment on lines 1633 to 1634
$(".roundsymbol").css("line-height","3.7rem");
$("#small-icons .status-icon").css("line-height","2.2rem");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having the styles applied directly in the JS, could we have CSS classes in the CSS file named after the issue (roundtsymbol-firefox-win, or something like that) and then use JS to apply them?

@microbit-carlos microbit-carlos merged commit 344873e into bbcmicrobit:v2-beta Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants