8000 Remove GitHub’s default styles by bnjmnt4n · Pull Request #3 · sindresorhus/github-markdown-css · GitHub
[go: up one dir, main page]

Skip to content

Remove GitHub’s default styles #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2014
Merged

Remove GitHub’s default styles #3

merged 1 commit into from
Jun 22, 2014

Conversation

bnjmnt4n
Copy link
Contributor
  • Remove the default html and body styles which are only
    applicable to GitHub
  • Prefix all selectors with .markdown-body

@bnjmnt4n
Copy link
Contributor Author

ping @sindresorhus

@zenorocha
Copy link

ping @D10

@bnjmnt4n
Copy link
Contributor Author

ping @zenorocha ;)

html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these needs to be preserved

@sindresorhus
Copy link
Owner

Thanks, but this breaks the layout. Please actually check how it looks and compare it to how it looked before (index.html) ;)

@bnjmnt4n
Copy link
Contributor Author

Yep, will fix tomorrow ;)

@bnjmnt4n
Copy link
Contributor Author

I've updated the PR, @sindresorhus you can review it again ;)

@@ -57,41 +51,39 @@ body {
}

body {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to be applied to .markdown-body and not body

@bnjmnt4n bnjmnt4n changed the title Remove GitHub’s default styles [closes #1] Remove GitHub’s default styles Jun 17, 2014
@bnjmnt4n
Copy link
Contributor Author

Updated again, and rebased against master.

return false;
}

if (el.selectors.length === 1 && /^(?:html|body)$/.test(el.selectors[0])) {
el.declarations = el.declarations.filter(function (declaration) {
if (!/^font|^(?:line-height|color)$|text-size-adjust$/.test(declaration.property)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a why comment here would be nice

@sindresorhus
Copy link
Owner

@D10 thanks, looking good :D

There are two outstanding issues, but I would be happy to open them as separate tickets if you prefer?

  • line 6-8 should be condensed into one line
  • .markdown-body is 4 separate rules. Would be nice if this were only one at the top. Probably by merging the others ones properties into the first.

Would you mind also adding yourself as a Contributor to package.json?

 * Remove some `html` and `body` styles which are only applicable to GitHub
 * Replace `html` and `body` selectors with `.markdown-body`
 * Prefix all other selectors with `.markdown-body`

Closes #1.
@bnjmnt4n
Copy link
Contributor Author

I won't be able to push commits for some time, you might want to fix the rest yourself :(

sindresorhus added a commit that referenced this pull request Jun 22, 2014
Remove GitHub’s default styles
@sindresorhus sindresorhus merged commit c919127 into sindresorhus:gh-pages Jun 22, 2014
@sindresorhus
Copy link
Owner

@D10 No worries. Thanks for this amazing PR :D

@sindresorhus
Copy link
Owner

I fixed both those issues and did a new release ;)

@willscripted
Copy link

thanks, d10! Works great :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0