Tom
Tom

Reputation: 11

CSS clip: unset; on Safari

I'm writing CSS in WordPress for a fullscreen background image. To get rid of a black rectangle to the left (menu/sidebar), I'm using the CSS below.

It's working fine in chrome, IE and on mobile, but not working on mac/safari.

How do I write this code so it works on Safari?

.mk-page-section .background-clipper {
    clip: unset;
}

Thanks

Upvotes: 0

Views: 450

Answers (2)

Tom
Tom

Reputation: 11

If I write just "auto" it doesn't work in any browser, the black rectangle is there. In Chrome/IE the "unset" seem to fix the problem.

.mk-page-section .background-clipper {
  clip: auto;
}

or:

.mk-page-section .background-clipper {
  clip: rect(auto, auto, auto, auto);
}

Any idea how to fix this on Safari? -webkit?

/T

Upvotes: 1

BoltClock
BoltClock

Reputation: 724202

Safari on macOS supports the unset value from version 9.1 and later.

In any case, using unset is unnecessary here. The initial value of clip is auto, so just write clip: auto.

Upvotes: 0

Related Questions