Created
November 1, 2012 15:58
-
-
Save ekancepts/3994549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Error-1 | |
DEPRECATION WARNING on line 21 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld.scss: | |
@extending an outer selector from within @media is deprecated. | |
You may only @extend selectors within the same directive. | |
This will be an error in Sass 3.3. | |
It can only work once @extend is supported natively in the browser. | |
# Error-2 | |
DEPRECATION WARNING on line 24 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld-landscape.scss: | |
@extending an outer selector from within @media is deprecated. | |
You may only @extend selectors within the same directive. | |
This will be an error in Sass 3.3. | |
It can only work once @extend is supported natively in the browser. | |
#Error-3 | |
DEPRECATION WARNING on line 21 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld.scss: | |
@extending an outer selector from within @media is deprecated. | |
You may only @extend selectors within the same directive. | |
This will be an error in Sass 3.3. | |
It can only work once @extend is supported natively in the browser. | |
#Error-4 | |
DEPRECATION WARNING on line 24 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld-landscape.scss: | |
@extending an outer selector from within @media is deprecated. | |
You may only @extend selectors within the same directive. | |
This will be an error in Sass 3.3. | |
It can only work once @extend is supported natively in the browser. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Errors are attached above */ | |
/* Code for Error-1 and Error-3 */ | |
.g-h-c { | |
@extend .g-base-c; | |
width: $handheld-width; | |
@include optional-grid-background( | |
$total: $handheld-columns, | |
$column: $handheld-col-width, | |
$gutter: $gutter-width, | |
$baseline: $base-line-height | |
); | |
} | |
/* Code for Error-2 and Error-4 */ | |
.g-h-c { | |
@extend .g-base-c; | |
width: $handheld-landscape-width; | |
@include optional-grid-background( | |
$total: $handheld-landscape-columns, | |
$column: $handheld-landscape-col-width, | |
$gutter: $gutter-width, | |
$baseline: $base-line-height | |
); | |
} |
Or you can just do what Chris Eppstein says to do... that's what I do when I'm in doubt ;-) https://twitter.com/chriseppstein/status/264065754289274880
When made following modifications the errors went away
Thanks to following people for assisting
https://twitter.com/chriseppstein
http://thesassway.com/
https://twitter.com/Snugug
https://gist.github.com/JohnRiv
.g-h-c {
@include centered; // this is a simple mixin from compass-layouts that sets margin: 0 auto.
@include pie-clearfix;
/@extend .g-base-c;/
width: $handheld-width;
@include optional-grid-background(
$total: $handheld-columns,
$column: $handheld-col-width,
$gutter: $gutter-width,
$baseline: $base-line-height
);
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the error says, you can't use @extend from within a media query (I assume .g-h-c is included in a media query if we were to look at the entire sass file). So you have to either manually duplicate .g-base-c's styles in .g-h-c or create a mixin that will output the styles for .g-base-c and include that in .g-h-c