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

Fix: Hide thumbnails in mobile portrait #967

Merged
merged 7 commits into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"rules": {
"indentation": 4,
"at-rule-no-vendor-prefix": true,
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin"] }],
"at-rule-no-unknown": [true, { "ignoreAtRules": ["include", "mixin", "content"] }],
"media-feature-name-no-vendor-prefix": true,
"property-no-vendor-prefix": true,
"selector-no-vendor-prefix": true,
Expand Down
18 changes: 18 additions & 0 deletions src/lib/viewers/doc/_docBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ $thumbnail-border-radius: 3px;
// Accounts for the 1px border on the right so the remaining width is actually 225
$thumbnail-sidebar-width: 226px;

@mixin for-phone-only {
@media (max-width: 599px) { @content; }
}

.bp {
.bp-thumbnails-container {
border-right: solid 1px $seesee;
Expand All @@ -16,6 +20,10 @@ $thumbnail-sidebar-width: 226px;
transform: translateX(-$thumbnail-sidebar-width);
transition: transform 300ms cubic-bezier(.4, 0, .2, 1);
width: $thumbnail-sidebar-width;

@include for-phone-only {
ConradJChan marked this conversation as resolved.
Show resolved Hide resolved
display: none;
}
}

&.bp-thumbnails-open {
Expand All @@ -25,6 +33,10 @@ $thumbnail-sidebar-width: 226px;

.bp-content {
left: $thumbnail-sidebar-width;

@include for-phone-only {
left: 0;
}
}
}

Expand Down Expand Up @@ -217,3 +229,9 @@ $thumbnail-sidebar-width: 226px;
.bp-content.bp-is-fullscreen .bp-toggle-thumbnails-icon {
display: none;
}

.bp-controls-btn.bp-toggle-thumbnails-icon {
@include for-phone-only {
display: none;
}
}