Mixing: Arguments - not sure what i'm doing


#1

This is what I have so far. and it is telling me to add an argument . I don't know what I am doing

@mixin backface_visibility($visibility){ //Add argument here//
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;
}

@mixin photo-content {
object-fit: cover;
}

//Add your own mixins here

.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);
&:hover{
@include transform
(rotatey(-180deg));
}

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

.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;

.definition {
  width: 100%;
  height: 100%;

  .photo {
    width: 60%;
    margin: 0px auto;

  }
}

}
}

--- My instructions were as follows:
In main.scss, modify backface-visibility mixin to take in a parameter, like so:

@mixin backface-visibility($visibility) { //Add an argument
backface-visibility: $visibility;
-webkit-backface-visibility: $visibility;
-moz-backface-visibility: $visibility;
-ms-backface-visibility: $visibility;
-o-backface-visibility: $visibility;
}
Pass in the value of hidden inside the .front, .back selector:

.front, .back {
@include backface-visibility(hidden);
}


#2

Having an issue with this myself.

I get what is supposed to happen, that when the card flips over, the text should be invisible (I think), however the text stays visible and just looks backwards - as if looking at it in a mirror.

Its showing the step as 'completed' for me, and I can progress, but I don't want to yet because I think something is going wrong.

Any help would be appreciated!


#3

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