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

Improve scrolling behaviour #1415

Merged
merged 2 commits into from
Apr 10, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ const messages = defineMessages({
clear: { id: 'notifications.clear', defaultMessage: 'Clear notifications' }
});

const iconStyle = {
fontSize: '16px',
padding: '15px',
position: 'absolute',
right: '48px',
top: '0',
cursor: 'pointer',
zIndex: '2'
};

const ClearColumnButton = React.createClass({

propTypes: {
Expand All @@ -25,7 +15,7 @@ const ClearColumnButton = React.createClass({
const { intl } = this.props;

return (
<div title={intl.formatMessage(messages.clear)} className='column-icon' tabIndex='0' style={iconStyle} onClick={this.props.onClick}>
<div title={intl.formatMessage(messages.clear)} className='column-icon column-icon-clear' tabIndex='0' onClick={this.props.onClick}>
<i className='fa fa-eraser' />
</div>
);
Expand Down
141 changes: 77 additions & 64 deletions app/assets/stylesheets/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@
}
}

.column-icon-clear {
font-size: 16px;
padding: 15px;
position: absolute;
right: 48px;
top: 0;
cursor: pointer;
z-index: 2;
}

@media screen and (min-width: 1024px) {
.column-icon-clear {
top: 10px;
}
}

.icon-button {
display: inline-block;
padding: 0;
Expand Down Expand Up @@ -714,25 +730,20 @@ a.status__content__spoiler-link {

@media screen and (min-width: 360px) {
.columns-area {
margin: 0;
}

.column:first-child, .drawer:first-child {
margin-left: 0;
}

.column:last-child, .drawer:last-child {
margin-right: 0;
padding: 10px;
}
}

.column {
width: 330px;
position: relative;
box-sizing: border-box;
background: $color1;
display: flex;
flex-direction: column;

> .scrollable {
background: $color1;
}
}

.ui {
Expand Down Expand Up @@ -764,6 +775,58 @@ a.status__content__spoiler-link {
border-bottom: 2px solid transparent;
}

.column, .drawer {
flex: 1 1 100%;
overflow: hidden;
}

@media screen and (min-width: 360px) {
.tabs-bar {
margin: 10px;
margin-bottom: 0;
}

.search {
margin-bottom: 10px;
}
}

@media screen and (max-width: 1024px) {
.column, .drawer {
width: 100%;
padding: 0;
}

.columns-area {
flex-direction: column;
}

.search__input, .autosuggest-textarea__textarea {
font-size: 16px;
}
}

@media screen and (min-width: 1024px) {
.columns-area {
padding: 0;
}

.column, .drawer {
flex: 0 0 auto;
padding: 10px;
padding-left: 5px;
padding-right: 5px;

&:first-child {
padding-left: 10px;
}

&:last-child {
padding-right: 10px;
}
}
}

@media screen and (min-width: 2560px) {
.columns-area {
justify-content: center;
Expand Down Expand Up @@ -823,38 +886,6 @@ a.status__content__spoiler-link {
}
}

.column, .drawer {
margin: 10px;
margin-left: 5px;
margin-right: 5px;
flex: 0 0 auto;
overflow: hidden;
}

.column:first-child, .drawer:first-child {
margin-left: 10px;
}

.column:last-child, .drawer:last-child {
margin-right: 10px;
}

@media screen and (max-width: 1024px) {
.column, .drawer {
width: 100%;
margin: 0;
flex: 1 1 100%;
}

.columns-area {
flex-direction: column;
}

.search__input, .autosuggest-textarea__textarea {
font-size: 16px;
}
}

.tabs-bar {
display: flex;
background: lighten($color1, 8%);
Expand Down Expand Up @@ -893,27 +924,6 @@ a.status__content__spoiler-link {
}
}

@media screen and (min-width: 360px) {
.columns-area {
margin: 10px;
}

.tabs-bar {
margin: 10px;
margin-bottom: 0;
}

.search {
margin-bottom: 10px;
}
}

@media screen and (min-width: 1024px) {
.columns-area {
margin: 0;
}
}

@media screen and (min-width: 600px) {
.tabs-bar__link {
.fa {
Expand Down Expand Up @@ -1381,12 +1391,15 @@ button.active i.fa-retweet {

.empty-column-indicator {
color: lighten($color1, 20%);
background: $color1;
text-align: center;
padding: 20px;
padding-top: 100px;
font-size: 15px;
font-weight: 400;
cursor: default;
display: flex;
flex: 1 1 auto;
align-items: center;

a {
color: $color4;
Expand Down