Code Monkey home page Code Monkey logo

Comments (8)

IschaGast avatar IschaGast commented on June 22, 2024

Now I also tried the code that's in the Wiki itself and that's also not working right now.

I tried this code:

Scss styles

Style.scss

$no-queries: 678px, 'no-query' true;

#foo {
  content: 'Basic Styling';
  @include breakpoint($no-queries) {
    content: 'No Media Queries';
  }
}

ie.scss

// Will not print media queries
$breakpoint-no-queries: true;
// Will print No Query Fallbacks
$breakpoint-no-query-fallbacks: true;

@import "style";

Generated styles

style.css

#foo {
    content:'Basic Styling'
}
@media (min-width: 678px) and (no-query: true) {
    #foo {
        content:'No Media Queries'
    }
}

ie.css

#foo {
    content:'Basic Styling'
}

I removed the .touch part of the code because it was giving an error into codekit
codekit

from breakpoint.

felek000 avatar felek000 commented on June 22, 2024

same problem any solution ??

from breakpoint.

Snugug avatar Snugug commented on June 22, 2024

Do you have the same problem with 2.4.x?

from breakpoint.

benkutil avatar benkutil commented on June 22, 2024

@Snugug, Iā€™m having a problem with fallbacks, but maybe Iā€™m making an assumption on how no query fallbacks can be used.

If I specify my fallback as part of a variable, it works no problem.

SCSS

$m-l: 60em, 'no-query' '.lt-ie9';
body {
  @include breakpoint($m-l) {
      display: none;
  }
}

Rendered CSS

@media (min-width: 60em) {
  body {
    display: none;
  }
}

.lt-ie9 body {
  display: none;
}

Great!


Sometimes, I have a medium and a large media query, and the ruleset can be applied for both. This isn't always the case, so in my variable for the medium query, I don't specify the fallback, and instead try to do it inline within breakpoint's parameters.

SCSS

$m-m: 48em;
$m-l: 60em, 'no-query' '.lt-ie9';

body {
  @include breakpoint($m-m, 'no-query' '.lt-ie9') {
    display: block;
  }
}

Rendered CSS

@media (min-width: 48em) {
  body {
    display: block;
  }
}

"no-query"    ".lt-ie9"   body {
  display: block;
}

Here, Iā€™d expect to get the no-query fallback, but am instead getting quoted strings in place of the selectors.

Is this not possible in Breakpoint? I didn't see it explicitly mentioned.

from breakpoint.

Snugug avatar Snugug commented on June 22, 2024

@benkutil In the future, if you have a different issue, even if it is related, please submit a new issue.

You can do one of the following: either wrap your call in parenthesis to make it one item (@include breakpoint(($m-m, 'no-query' '.lt-ie9')) {}) or you can drop the no-query as the 2nd argument for the Breakpoint mixin is already no-query (@include breakpoint($m-m, '.lt-ie9') {})

from breakpoint.

benkutil avatar benkutil commented on June 22, 2024

Thanks @Snugug for the quick reply, sorry to hijack the thread!

from breakpoint.

Snugug avatar Snugug commented on June 22, 2024

Is the main issue still a problem with the latest version of Breakpoint?

from breakpoint.

Snugug avatar Snugug commented on June 22, 2024

Seeing no movement, closing this.

from breakpoint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.