Skip to content

Commit

Permalink
Merge pull request #152 from lineupjs/sgratzl/safari
Browse files Browse the repository at this point in the history
work on safari translate3d issues
  • Loading branch information
sgratzl committed Apr 24, 2019
2 parents 7a035dd + 54d223e commit d93d3ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/styles/_lineup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import './datatypes';
@import './taggle/index';
@import './supported_browser';
@import './safari';

.#{$lu_css_prefix} {
position: relative;
Expand Down
15 changes: 15 additions & 0 deletions src/styles/_safari.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// safari 10+ only
// see https://stackoverflow.com/questions/16348489/is-there-a-css-hack-for-safari-only-not-chrome#25975282

@import './vars';

$lu_safari_check: 0.001dpcm;

@media not all and (min-resolution: $lu_safari_check) {
@supports (-webkit-appearance: none) {
.#{$engine_css_prefix}-header,
.#{$lu_css_prefix}-side-panel {
transform: unset;
}
}
}
3 changes: 2 additions & 1 deletion src/ui/dialogs/DialogManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default class DialogManager {
setHighlight(mask: { left: number, top: number, width: number, height: number }) {
const area = <HTMLElement>this.node.firstElementChild;
// @see http://bennettfeely.com/clippy/ -> select `Frame` example
area.style.clipPath = `polygon(
// use webkit prefix for safari
area.style.clipPath = (<any>area.style).webkitClipPath = `polygon(
0% 0%,
0% 100%,
${mask.left}px 100%,
Expand Down

0 comments on commit d93d3ca

Please sign in to comment.