Skip to content

Why is Foundation media queries not working when i use a breakpoint name? #12517

Open
@mannclay

Description

@mannclay
  I have tested other JS components like accordions and they work fine. For some reason media queries are not working as expected. 

For example:
.header-first, .header-second { @include breakpoint(medium) { background: $cerulean; } }

compiles to the below where the name of the breakpoint is added but not the size of 640px as in the _settings.scss:

@media (min-width: medium) { .header .header-first, .header .header-second { background: #0098db;} }

I have tested that _settings.scss is working by customizing other components. I have also tested that the JS is working with:
console.log('Current: ' + Foundation.MediaQuery.current)

Any hints on what going on?

Originally posted by @mannclay in https://github.com/foundation/foundation-sites/discussions/12516

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