Skip to content

Commit

Permalink
Super quick fix for house tabs on mobile
Browse files Browse the repository at this point in the history
Also includes some fixes for various term_table page elements
that were causing horizontal scrolling on narrow screens.
  • Loading branch information
zarino authored and octopusinvitro committed Sep 2, 2016
1 parent 5564335 commit ec2eaa1
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
17 changes: 16 additions & 1 deletion views/sass/_components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,18 @@ p.lead {
@extend .inline-list;
padding-top: 1em;

@media (min-width: $medium_screen) and (min-height: 600px) {
// Make the tabs scroll horizontally on small screens.
// TODO: Make this not suck when the currently selected tab is
// hidden off to the far right of the line.
@media (max-width: $small_screen_max) {
text-align: left;
white-space: nowrap;
overflow: auto;
margin: 0 -1em;
padding: 1em 0.5em 0 0.5em;
}

@media (min-width: $medium_screen) and (min-height: 600px) {
padding-top: 1.5em;
}
}
Expand All @@ -538,3 +549,7 @@ p.lead {
.house-tab--active:focus {
background: #fff;
}

.source-credits a {
@extend .break-word;
}
15 changes: 15 additions & 0 deletions views/sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,18 @@
}
}
}

.break-word {
// https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
overflow-wrap: break-word;
word-wrap: break-word;

-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;

-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
4 changes: 4 additions & 0 deletions views/sass/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ textarea {
-webkit-appearance: none;
}

select {
max-width: 100%;
}

fieldset {
padding: 0;
border: 0;
Expand Down
1 change: 1 addition & 0 deletions views/sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ $high_dpi_screen: '-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi

$large_screen_max: $giant_screen - (1em * (1px / $size_font-base));
$medium_screen_max: $large_screen - (1em * (1px / $size_font-base));
$small_screen_max: $medium_screen - (1em * (1px / $size_font-base));

$animation-short: 0.2s ease-out;

Expand Down

0 comments on commit ec2eaa1

Please sign in to comment.