简体   繁体   English

断点2.7.0语法

[英]Breakpoint 2.7.0 Syntax

I had been using breakpoint 2.5 for quite sometime. 我一直在使用断点2.5。 I got a new Mac and setup breakpoint on it. 我有一个新的Mac和设置断点。 I installed 2.7.0 Clearly there has been some changes between 2.5.0 and 2.7.0 of breakpoint. 我安装了2.7.0显然,在2.5.0和2.7.0的断点之间有一些更改。

Here is the contents of my breakpoint.scss file (ignore the px values, they are just random ones I typed in) 这是我的breakpoint.scss文件的内容(忽略px值,它们只是我输入的随机值)

$breakpoint-to-ems: true;
$breakpoint-no-query-fallbacks: true;
$breakpoint-default-media: screen;

$xsmall:    320px;
$small: 480px;
$medium:    760px, 'no-query' '.lt-ie9';
$large: 960px, 'no-query' '.lt-ie9';
$xl:        1200px;
$mega:      1700px;

I would then call a mixin such as the following if I wanted to target the $medium breakpoint: 如果要定位到$ medium断点,我将调用如下的mixin:

@include breakpoint($medium) {
        font-size: 60px;
}

Using that with breakpoint 2.5.0 was fine. 使用断点2.5.0很好。 Using it with 2.7.0 is causing several warnings. 与2.7.0一起使用会导致多次警告。

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-default-media: {{setting}} to @include breakpoint-set('default media', {{setting}}) . 请将$breakpoint-default-media: {{setting}}所有实例更改为@include breakpoint-set('default media', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-to-ems: {{setting}} to @include breakpoint-set('to ems', {{setting}}) . 请将$breakpoint-to-ems: {{setting}}所有实例$breakpoint-to-ems: {{setting}}更改为@include breakpoint-set('to ems', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 在将来的版本中将不建议使用变量设置以及此警告。

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-no-queries: {{setting}} to @include breakpoint-set('no queries', {{setting}}) . 请将$breakpoint-no-queries: {{setting}}所有实例$breakpoint-no-queries: {{setting}}更改为@include breakpoint-set('no queries', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的namspace冲突,我们更新了更改Breakpoint设置的方法。 Please change all instances of $breakpoint-no-query-fallbacks: {{setting}} to @include breakpoint-set('no query fallbacks', {{setting}}) . 请将$breakpoint-no-query-fallbacks: {{setting}}所有实例$breakpoint-no-query-fallbacks: {{setting}}更改为@include breakpoint-set('no query fallbacks', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。

I was able to clear up those 3 fairly easily with a search of good old Google. 通过搜索好的旧谷歌,我能够轻松地清理这3个。

I changed 我变了

$breakpoint-to-ems: true; $ breakpoint-to-ems:true;

to be 成为

@include breakpoint-set('to ems', true); @include breakpoint-set('to ems',true);

I changed 我变了

$breakpoint-no-query-fallbacks: true; $ breakpoint-no-query-fallbacks:true;

to be 成为

@include breakpoint-set('no query fallbacks', true); @include breakpoint-set('no query fallbacks',true);

I changed 我变了

$breakpoint-default-media: screen; $ breakpoint-default-media:screen;

to be 成为

@include breakpoint-set('default media', screen); @include breakpoint-set('默认媒体',屏幕);

The issue I am having now is that every instance of the breakpoint mixin being used in my bluehive.scss file using the $medium or $large breakpoint, such as 我现在遇到的问题是断点mixin的每个实例都在我的bluehive.scss文件中使用$ medium或$ large断点,例如

@include breakpoint($medium) {
        font-size: 60px;
}

is throwing a warning: 正在发出警告:

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-no-queries: {{setting}} to @include breakpoint-set('no queries', {{setting}}) . 请将$breakpoint-no-queries: {{setting}}所有实例$breakpoint-no-queries: {{setting}}更改为@include breakpoint-set('no queries', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 在将来的版本中将不建议使用变量设置以及此警告。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 62 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行中,在“ legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint'from / 62 / Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme /bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-no-query-fallbacks: {{setting}} to @include breakpoint-set('no query fallbacks', {{setting}}) . 请将$breakpoint-no-query-fallbacks: {{setting}}所有实例$breakpoint-no-query-fallbacks: {{setting}}更改为@include breakpoint-set('no query fallbacks', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 在将来的版本中将不建议使用变量设置以及此警告。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 62 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行中,在“ legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint'from / 62 / Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme /bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的namspace冲突,我们更新了更改Breakpoint设置的方法。 Please change all instances of $breakpoint-no-queries: {{setting}} to @include breakpoint-set('no queries', {{setting}}) . 请将$breakpoint-no-queries: {{setting}}所有实例$breakpoint-no-queries: {{setting}}更改为@include breakpoint-set('no queries', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 87 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行,在legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme的第87行的断点/bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的namspace冲突,我们更新了更改Breakpoint设置的方法。 Please change all instances of $breakpoint-no-query-fallbacks: {{setting}} to @include breakpoint-set('no query fallbacks', {{setting}}) . 请将$breakpoint-no-query-fallbacks: {{setting}}所有实例$breakpoint-no-query-fallbacks: {{setting}}更改为@include breakpoint-set('no query fallbacks', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 87 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行,在legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme的第87行的断点/bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的namspace冲突,我们更新了更改Breakpoint设置的方法。 Please change all instances of $breakpoint-no-queries: {{setting}} to @include breakpoint-set('no queries', {{setting}}) . 请将$breakpoint-no-queries: {{setting}}所有实例$breakpoint-no-queries: {{setting}}更改为@include breakpoint-set('no queries', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 90 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行中,在“ legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme的第90行的断点/bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的namspace冲突,我们更新了更改Breakpoint设置的方法。 Please change all instances of $breakpoint-no-query-fallbacks: {{setting}} to @include breakpoint-set('no query fallbacks', {{setting}}) . 请将$breakpoint-no-query-fallbacks: {{setting}}所有实例$breakpoint-no-query-fallbacks: {{setting}}更改为@include breakpoint-set('no query fallbacks', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 在将来的版本中将不建议使用变量设置以及此警告。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 90 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行,在legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in / Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme的第90行中/bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-no-queries: {{setting}} to @include breakpoint-set('no queries', {{setting}}) . 请将$breakpoint-no-queries: {{setting}}所有实例$breakpoint-no-queries: {{setting}}更改为@include breakpoint-set('no queries', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 变量设置以及此警告将在以后的版本中弃用。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 99 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行,在legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in断点”,位于/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme /bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

WARNING: In order to avoid variable namspace collisions, we have updated the way to change settings for Breakpoint. 警告:为了避免可变的命名空间冲突,我们更新了更改断点设置的方法。 Please change all instances of $breakpoint-no-query-fallbacks: {{setting}} to @include breakpoint-set('no query fallbacks', {{setting}}) . 请将$breakpoint-no-query-fallbacks: {{setting}}所有实例$breakpoint-no-query-fallbacks: {{setting}}更改为@include breakpoint-set('no query fallbacks', {{setting}}) Variable settings, as well as this warning will be deprecated in a future release. 在将来的版本中将不建议使用变量设置以及此警告。 on line 16 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss, in legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in breakpoint' from line 99 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/_bluehive.scss from line 14 of /Users/chadwarren/Dropbox/Bluehive Interactive/Website 2016/Theme/bluehiveinteractive-2016/assets/scss/styles.scss 在/Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/breakpoint/_legacy-settings.scss的第16行,在legacy-settings-warning' from line 41 of /Users/chadwarren/.rvm/gems/ruby-2.3.0/gems/breakpoint-2.7.0/stylesheets/_breakpoint.scss, in断点”,位于/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme /bluehiveinteractive-2016/assets/scss/_bluehive.scss来自/ Users / chadwarren / Dropbox / Bluehive Interactive / Website 2016 / Theme / bluehiveinteractive-2016 / assets / scss / styles.scss第14行

Is there a new way of declaring and using the breakpoints in version 2.7.0 ? 2.7.0版中是否有新的声明和使用断点的方法? I've been unable to find anything which says that this has changed. 我一直找不到任何表明这已经改变的东西。

Thank you :-) 谢谢 :-)

Try including @import "breakpoint"; 尝试包括@import "breakpoint"; in your styles.scss, after use 在你的styles.scss中,使用后

@include breakpoint-set('no queries', true); @include breakpoint-set('no query fallbacks', true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM