Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Grid Column Gap challenge matches with a declaration outside of the .container rule #228

Open
joshalling opened this issue Aug 8, 2018 · 1 comment · May be fixed by #236
Open

Grid Column Gap challenge matches with a declaration outside of the .container rule #228

joshalling opened this issue Aug 8, 2018 · 1 comment · May be fixed by #236

Comments

@joshalling
Copy link
Member

joshalling commented Aug 8, 2018

The grid column gap challenge doesn't ensure that your declaration is within the .container rule. This means you can put the grid-column-gap declaration in a different rule and still pass the challenge.

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. add the following code below the .container rule
  div {
     grid-column-gap: 20px;
  }
  1. Click run and the test passes

This issue persists throughout a lot of the Grid challenges. I propose that we update the regex to prevent the test from passing if a closing curly brace is present between the .container selector and the grid-column-gap declaration.

@RobAnthony01
Copy link
Contributor

RobAnthony01 commented Aug 10, 2018

Actually it's worse than that as this passes

    junk   grid-column-gap: 20px;

and

    junkgrid-column-gap: 20px;

We could check there is nothing else between the two forward slashes (in the comments) other than whitespace?

So, this would pass:

    /* add your code below this line */
    grid-column-gap: 20px;
    /* add your code above this line */

but this would not:

    /* add your code below this line */
    junk grid-column-gap: 20px;
    /* add your code above this line */

This was referenced Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants