Skip to content

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

@aykut-rocks

Description

@aykut-rocks

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions