CodeHQ

Posts Tagged ‘css3’

|

@Supports CSS function

Friday, February 22nd, 2019

In this example .article-grid will be block unless the browser has support for display: grid, at which case, the styles within the @supports block will kick in and override the previous display declaration.

.article-grid {
    display: block;
}

@supports (display: grid) {
    .article-grid {
        display: grid;
    }
}

Tags: , , , , ,
Posted in CSS | No Comments »