Search code examples
cssangularsassgrid-layout

Using grid with Angular (CSS)


I would like to use display: grid; in my Angular project. According to https://caniuse.com/#feat=css-grid it seems that IE 11 only partially supports it by using -ms-. prefix.

Would it be enough that I install autoprefixer from npm and let it do the magic, or should I just use flexbox instead with the flex-layout package?


Solution

  • It is a very safe option to use autoprefixer and 95% of the scenarios will work. Still test well however, because for the other 5% it might be needed to write some specific CSS. But in general, like I said, you will save a lot of time with it and you will find out that you can easily use grid in IE11 because of this.

    An example is "gap". IE11, has no alternative for this so autoprefixer will not save you from that one.