Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Test Suite overrides page margin #87

Closed
kevcomedia opened this issue Apr 26, 2017 · 4 comments · Fixed by #88
Closed

Test Suite overrides page margin #87

kevcomedia opened this issue Apr 26, 2017 · 4 comments · Fixed by #88

Comments

@kevcomedia
Copy link
Contributor

Issue Description

The test suite overrides the project's <body>'s margin and sets it to 0. Example.

Screenshot

image

image

@no-stack-dub-sack
Copy link
Member

@kevcomedia Thanks for pointing out this issue. I did some investigating, because this was news to me, and it turns out it is not the test suite itself, but Mocha's CSS which is overriding this rule in your example:

#mocha h1, #mocha h2, body {
    margin: 0
}

This may be because we have mocha css hard coded into the project in order to keep everything bundled nicely for campers, I suspect that if mocha was pulled in as a CDN, the order of the stylesheets would change, and this would not be the case.

That said, I did check for other such conflicts and there are none, so a quick solution to this would just be to add !important to your rule.

Hope this helps! Thanks again and happy coding!

@kevcomedia
Copy link
Contributor Author

If the css is hard-coded, maybe it can be removed? It's the only (simple) selector in the mocha css that doesn't target any class or id, and it doesn't seem to serve any real purpose. And it might trip other campers later on, especially when beta goes live.

@no-stack-dub-sack
Copy link
Member

@kevcomedia You know, I thought of this yesterday just after leaving the comment as I looked closer at the code. I would agree — so far as I can tell, in this instance it seems to serve zero purpose, and it definitely may help more inexperienced campers especially.

Feel like making a quick PR? Again, thanks for bringing this to my attention.

p.s. and sorry for the late reply, I've been very caught up in another project lately, and unfortunately I'm the only one monitoring this repo at all right now.

@kevcomedia
Copy link
Contributor Author

There you go 🙂
If something's not right let me know. And I don't mind the late reply at all 😃

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