anandthakker / doiuse

:bomb: Lint CSS for browser support against caniuse database.
MIT License
1.24k stars 51 forks source link

grid-template-columns falsely identified as "multicolumn" feature #100

Closed ultraq closed 1 year ago

ultraq commented 5 years ago

I wrote a style that uses grid-template-columns, but it gets marked as the CSS "multicolumn" feature: Unexpected browser feature "multicolumn" is only partially supported by Firefox 60,62,63 (output is from https://github.com/ismay/stylelint-no-unsupported-browser-features which uses this library under the hood).

Reading the How it works section, I read that a rather simple string matching is done using the data/features.js file, and looking through that file I can see that the word columns is associated with the the multicolumn feature: https://github.com/anandthakker/doiuse/blob/master/data/features.js#L80-L82

I'm not sure what your plans are for being able to distinguish between these kinds of features, but I thought you should know that it's having this effect 🙂

totkeks commented 5 years ago

Stumbled upon the same problem with stylelint just about now.

From what you write it seems that the string matcher should match full properties instead of just looking for words. so it should check for <start of word>columns:, which would match the multicolumns feature and not grid-template-columns:

VBagmut commented 4 years ago

When it will be fixed?

jgonera commented 4 years ago

If you find adding stylelint-disable-next-line comments tiring as a workaround you can use:

grid-template: auto / 1fr 272px;

instead of

grid-template-columns: 1fr 272px;

and

grid-template: 1fr 272px / auto;

for rows.

pkuczynski commented 3 years ago

I would happily accept a PR if you have some time to work on it?

clshortfuse commented 1 year ago

Fixed in #159

echo 'body{grid-template-columns: auto;}' | npx doiuse --browsers "ie >= 8"
<streaming css input>:1:1: CSS Grid Layout (level 1) not supported by: IE (8,9) and only partially supported by: IE (10,11) (css-grid)