7. Is it a bug or am i dumb?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

String interpolation
<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>
The code should be 100% correct but it’s not working properly.
i get the error msg “Did you include the photo-content mixin inside of the .photo class selector and pass in a value of titanosaur?” when I’m pretty sure I did. Sorry in advance if i waste anyones time.

```

@mixin transition($time){
transition: $time;
-webkit-transition: $time;
-moz-transition: $time;
-o-transition: $time;
}

@mixin stripes($direction, $width-percent, $stripe-color, $stripe-background: #FFF) {
background: repeating-linear-gradient(
$direction,
$stripe-background,
$stripe-background ($width-percent - 1),
$stripe-color 1%,
$stripe-background $width-percent
);
}

$stripe-properties: to bottom, 15%, blue, white;

@mixin photo-content($file) {
content: url(#{$file}.jpg);
object-fit: cover;
}

//Add your own mixins here
@mixin backface-visibility($visibility: hidden) {
backface-visibility: $visibility;
-webkit-backface-visibility: $visibility;
-moz-backface-visibility: $visibility;
-ms-backface-visibility: $visibility;
-o-backface-visibility: $visibility;
}
@mixin transform($transformation) {
transform: $transformation;
-webkit-transform: $transformation;
-moz-transform: $transformation;
-ms-transform: $transformation;
-o-transform: $transformation;
}
@mixin transform-style($style) {
transform-style: $style;
-webkit-transform-style: $style;
-moz-transform-style: $style;
-ms-transform-style: $style;
-o-transform-style: $style;
}

.notecard {
@include transform-style(preserve-3d);
@include transition(0.4s);
&:hover{
@include transform(rotatey(-180deg));
}

width: 300px;
height: 180px;
border: 1px solid black;
display: inline-block;
margin: 20px;
font-family: Roboto, sans-serif;
box-shadow: 1px 1px 2px 2px rgba(0,0,0,.2);

.front, .back {
width: 100%;
height: 100%;
position: absolute;
@include backface-visibility;
}

.front {
z-index: 3;
font-size: 20px;

.word {
  display: block;
  text-align: center;
  position: relative;
  top: 40%;
}    

}

.back {
z-index: 1;
word-wrap: break-word;
line-height: 1.6;
@include transform(rotatey(-180deg));
.definition {
width: 100%;
height: 100%;
@include stripes($stripe-properties);

  .photo {
    @include photo-content('titanosaur');
    width: 60%;
    margin: 0px auto;
  }
}

}
}

<do not remove the three backticks above>

I am getting the exact same error also.

cant seems to get around this.

  • Resolved the issue. Hope this helps

$stripe-properties: to bottom, 15%, blue, white;

@mixin photo-content($file) {
content: url(#{$file}.jpg);
object-fit: cover;
}

@mixin transition($time){
transition: $time;
-webkit-transition: $time;
-moz-transition: $time;
-o-transition: $time;
}

@mixin transform-style($style){
transform-style: $style;
-moz-transform-style: $style;
-o-transform-style: $style;
-ms-transform-style: $style;
-webkit-transform-style: $style;
}

@mixin backface-visibility($visibility: hidden) {
backface-visibility: $visibility;
-webkit-backface-visibility: $visibility;
-moz-backface-visibility: $visibility;
-ms-backface-visibility: $visibility;
-o-backface-visibility: $visibility;
}

@mixin stripes($direction, $width-percent, $stripe-color, $stripe-background: #FFF) {
background: repeating-linear-gradient(
$direction,
$stripe-background,
$stripe-background ($width-percent - 1),
$stripe-color 1%,
$stripe-background $width-percent
);
}

@mixin transform($transformation) {
transform: $transformation;
-webkit-transform: $transformation;
-moz-transform: $transformation;
-ms-transform: $transformation;
-o-transform: $transformation;
}

&:hover {
@include transform (rotatey(-180deg));

.notecard {
width: 300px;
height: 180px;
border: 1px solid black;
display: inline-block;
margin: 20px;
font-family: Roboto, sans-serif;
box-shadow: 1px 1px 2px 2px rgba(0,0,0,.2);
@include transform-style(preserve-3d);
@include transition(0.4s);

.front, .back {
width: 100%;
height: 100%;
position: absolute;
@include backface-visibility;
}

.front {
z-index: 3;
font-size: 20px;

.word {
  display: block;
  text-align: center;
  position: relative;
  top: 40%;
}    

}

.back {
z-index: 1;
word-wrap: break-word;
line-height: 1.6;
@include transform(rotatey(-180deg));

.definition {
  width: 100%;
  height: 100%;
  @include stripes($stripe-properties...);
        
  .photo {
   
    @include photo-content('titanosaur');
    width: 60%;
    margin: 0px auto;  
    
  }
}

}

Copy and pasted your exact code, restarted my computer, still nothing :frowning:

Same problem here, already reported a bug

2 Likes

to move forward paste: content: url(titanosaur.jpg);
inside .photo class in the mai.css file NOT main.scss

1 Like

Main.css is read only, that is, you cannot write anything in it haha

Same here. Pretty sure my code is right.

I couldn’t get by either - but if you open the main.css in the first window, you can add “content: url(titanosaur.jpg);” in the .photo section of that file, and it will let you move on.

3 Likes

same problem here!!! please help!

it keeps saying "can’t read property ‘1’ of null!! why does it do that?

The problem in a bug that appears only when using Safari. When you try the same code in a Chrome all good. So this is the “Code academy” bug.

Not really, i got the error when on chrome…

This helped! :smiley: Thanks! Just open the .css file and edit as @bytewhiz54022 said.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.