Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the arrow buttons so they always display on one line. Especially on mobile. #34611

Merged
merged 1 commit into from May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions apps/src/templates/ArrowButtons.jsx
Expand Up @@ -10,21 +10,12 @@ var ArrowButtons = function(props) {
<button type="button" id="leftButton" disabled className="arrow">
<img src="/blockly/media/1x1.gif" className="left-btn icon21" />
</button>
{
' ' /* Explicitly insert whitespace so that this behaves like our ejs file*/
}
<button type="button" id="rightButton" disabled className="arrow">
<img src="/blockly/media/1x1.gif" className="right-btn icon21" />
</button>
{
' ' /* Explicitly insert whitespace so that this behaves like our ejs file*/
}
<button type="button" id="upButton" disabled className="arrow">
<img src="/blockly/media/1x1.gif" className="up-btn icon21" />
</button>
{
' ' /* Explicitly insert whitespace so that this behaves like our ejs file*/
}
<button type="button" id="downButton" disabled className="arrow">
<img src="/blockly/media/1x1.gif" className="down-btn icon21" />
</button>
Expand Down
13 changes: 7 additions & 6 deletions apps/style/common.scss
Expand Up @@ -224,7 +224,7 @@ button.arrow {
border: 1px solid #FFA000;
background-color: #FFA000;
color: #fff;
margin-left: 5px;
margin-left: 9px;
margin-right: 0px;
display: none;
}
Expand All @@ -243,18 +243,19 @@ button.arrow:disabled {
#soft-buttons {
display: inline-block;
vertical-align: top;
margin-left: -5px;
margin-left: -9px;
-webkit-touch-callout: none;
&.soft-buttons-none {
display: none;
}
&.soft-buttons-compact {
margin-left: 0;
margin: 0;
button {
margin: 0;
margin: 0 4px 0 0;
}
}
}

.soft-buttons-1 {
display: table-cell;
vertical-align: top;
Expand Down Expand Up @@ -488,9 +489,9 @@ html[dir='rtl'] div#visualizationResizeBar {
@include karel-counter(32px, 2px);

#soft-buttons {
margin-left: 0;
margin: 5px -8px 0 0;
button {
margin: 0;
margin: 0 4px 0 0;
}
}
.small-footer-base.responsive {
Expand Down
17 changes: 17 additions & 0 deletions apps/style/craft/style.scss
Expand Up @@ -160,6 +160,23 @@ $text-shadow-gray: #5a5a5a;
@include pixelated();
}

#soft-buttons.soft-buttons-compact {
margin-left: 0;
button {
margin: 0;
}
}

@media screen and (max-width: 1000px),
screen and (max-height: 600px) {
#soft-buttons {
margin: 0, -5px, 0, 0;
button {
margin: 0;
}
}
}

.left-btn {
@include arrow-icon("#{$root}Sliced_Parts/MC_Run_Arrow_Icon_Smaller.png");
@include flip-horizontal(1);
Expand Down