Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Overflow: overlay. Is it deprecated? How can I replace it?

Tags:

css

I have a legacy web app with non-standard css property value;

myClass{
    overflow: overlay;
}

I googled a bit, but did not found much about this property.
This link says that it works like overflow:auto for webkit browsers, but it is false.
Simple sample to show the difference and existance of this value. Checked in last chrome.

Is it deprecated now?
Is it a crutch for legacy browsers? (What browsers exactly?)
What is the semantic of this value?
Should I replace it?
How can I replace it?

like image 862
Daydreaming Duck Avatar asked May 30 '16 12:05

Daydreaming Duck


2 Answers

There is an easier way to have the same effect that would not trigger reflow ever: using visibility property and nested blocks:

.scrollbox {
  width: 10em;
  height: 10em;
  overflow: auto;
  visibility: hidden;
}

.scrollbox-content,
.scrollbox:hover,
.scrollbox:focus {
  visibility: visible;
}
like image 50
Kashif Avatar answered Nov 13 '22 21:11

Kashif


There was/is an undocumented overlay option for overflow in webkit browsers. I don't suggest that you use until it's standardized.

https://bugs.webkit.org/show_bug.cgi?id=32388

like image 41
Paran0a Avatar answered Nov 13 '22 23:11

Paran0a