Skip to content

Commit

Permalink
Scrollbar Fix on Mac. Fixes issue #100 (#1354)
Browse files Browse the repository at this point in the history
* Fix Scrollbar appearance on webkit mac

* fix linting issues
  • Loading branch information
micopc authored and rauchg committed Jan 8, 2017
1 parent ea8a32d commit ed990d4
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions lib/components/term.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,30 @@ export default class Term extends Component {
font-size: ${this.props.fontSize}px;
}
`;
const osSpecificCss = process.platform === 'win32' ?
`::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
background: ${this.props.borderColor};
}
::-webkit-scrollbar-thumb:window-inactive {
background: ${this.props.borderColor};
}` : ''
;
let osSpecificCss = '';
if (process.platform === 'win32') {
osSpecificCss = `::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
background: ${this.props.borderColor};
}
::-webkit-scrollbar-thumb:window-inactive {
background: ${this.props.borderColor};
}`;
} else if (process.platform === 'darwin') {
osSpecificCss = `::-webkit-scrollbar {
width: 9px;
background: transparent;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: inset 0 0 0 1px ${this.props.borderColor};
}`;
}
return URL.createObjectURL(new Blob([`
.cursor-node[focus="false"] {
border-width: 1px !important;
Expand Down

0 comments on commit ed990d4

Please sign in to comment.