at-import / breakpoint

Really simple media queries in Sass
MIT License
2.09k stars 142 forks source link

hover: hover doesn't work because of missing value in variable #193

Open aykut-rocks opened 7 months ago

aykut-rocks commented 7 months ago

if i define

$media: (pointer fine);

.foo { @include breakpoint($media) { border: 0; } }

the result is: @media (pointer: fine) { .foo { border: 0; } }

but if i define

$media: (hover hover);

.foo { @include breakpoint($media) { border: 0; } }

the result is @media (: ) { .foo { border: 0; } }

As you see the query is empty, but the combination of pointer: fine and hover: hover is an important tool these days to identify non-touch devices, but this is not possible with breakpoint, so i'm not able to create a mixin and have to pollute our code with a lot of dublications, so i made the following changes locally:

the variable $breakpoint-string-features in the helpers.scss must be expanded with hover:

$breakpoint-string-features: 'orientation', 'scan', 'color', 'aspect-ratio', 'device-aspect-ratio', 'pointer', 'luminosity', 'hover';

could you please include this hover expansion to your codebase?