Skip to content

Commit

Permalink
Fix responsive issue on WelcomeBox (firefox-devtools#4119)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstratos authored and amitzur committed Oct 5, 2017
1 parent ee66f35 commit 281370c
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
34 changes: 34 additions & 0 deletions src/components/WelcomeBox.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,26 @@
offset-inline-start: auto;
}

.welcomebox .small-size-layout {
display: none;
}

.welcomebox .normal-layout {
display: inline-block;
}

.shortcutKeys {
text-align: right;
float: left;
font-family: Courier;
}

.shortcutKey {
display: inline-block;
margin-right: 10px;
font-family: Courier;
}

.shortcutFunction {
text-align: left;
float: left;
Expand All @@ -47,3 +61,23 @@
html .welcomebox .toggle-button-end.collapsed {
bottom: 1px;
}

@media (max-width: 430px) {

.welcomebox .small-size-layout {
display: inline-block;
}

.welcomebox .normal-layout {
display: none;
}

.shortcutFunction {
margin-left: 0;
}

.shortcutKey {
display: block;
}
}

16 changes: 14 additions & 2 deletions src/components/WelcomeBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,20 @@ class WelcomeBox extends Component {

return (
<div className="welcomebox">
<div className="alignlabel">
<div className="alignlabel small-size-layout">
<div className="shortcutFunction">
<p onClick={setActiveSearch.bind(null, "source")}>
<div className="shortcutKey">{searchSourcesShortcut}</div>
{searchSourcesLabel}
</p>
<p onClick={setActiveSearch.bind(null, "project")}>
<div className="shortcutKey">{searchProjectShortcut}</div>
{searchProjectLabel}
</p>
</div>
{this.renderToggleButton()}
</div>
<div className="alignlabel normal-layout">
<div className="shortcutKeys">
<p onClick={setActiveSearch.bind(null, "source")}>
{searchSourcesShortcut}
Expand All @@ -70,7 +83,6 @@ class WelcomeBox extends Component {
{searchProjectLabel}
</p>
</div>
{this.renderToggleButton()}
</div>
</div>
);
Expand Down

0 comments on commit 281370c

Please sign in to comment.