What is the alternate solution to implement the following in chrome.
display:contents;
Currently only firefox supports them in all versions.
Is there any other way to get the same features as this css tag.
Many desktop applications, such as Visual Studio Code, Microsoft Teams, and Microsoft Edge already do this: The Window Controls Overlay API does the following: Allows you to display web content over the entire surface area of the app.
display: contents causes an element's children to appear as if they were direct children of the element's parent, ignoring the element itself. This can be useful when a wrapper element should be ignored when using CSS grid or similar layout techniques.
The display CSS property sets whether an element is treated as a block or inline element and the layout used for its children, such as flow layout, grid or flex. Formally, the display property sets an element's inner and outer display types.
You can use an alternative approach, instead using display:content (that is marked as experimental at the moment) you can create a container class and add the property display:grid
, and, in case the browser supports display:content
use it with this code:
@supports (display: contents) {
article { display: contents; }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With