Comments (8)
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
from breakpoint.
same problem any solution ??
from breakpoint.
Do you have the same problem with 2.4.x?
from breakpoint.
@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.
@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.
Thanks @Snugug for the quick reply, sorry to hijack the thread!
from breakpoint.
Is the main issue still a problem with the latest version of Breakpoint?
from breakpoint.
Seeing no movement, closing this.
from breakpoint.
Related Issues (20)
- Allow `null` or `false` breakpoints to output styles without media query
- Error: Incompatible units: 'em' and 'em*px'. HOT 1
- How to import breakpoint with webpack? HOT 5
- Sourcemaps Issue Stylesheet could not be loaded...
- W3C error on min-aspect-ratio and max-aspect-ratio
- Spelling mistake in error message in _legacy-settings.scss
- component/sass/styles.scss (Line 3: File to import not found or unreadable: breakpoint.
- Consider using >=0.8.2 for eyeglass "needs"
- Can't seem to extend a placeholder or class which consists solely of media query content coming from Breakpoint HOT 2
- Typo in documentation
- Installation for breakpoint doesn't work
- Can media queries be grouped in css? HOT 1
- eyeglass usage notes
- Using "only screen" with the mixin HOT 1
- can't override default variables HOT 1
- Dual license clarification HOT 2
- Sass needs to be replaced as it is EoL HOT 1
- Are Level 4 Media Queries supported??? HOT 3
- licence MIT AND/OR GPL HOT 1
- breakpoint doesn't work with sass 1.49.9 because of breaking change: slash as division HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from breakpoint.