Skip to content
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

Tables without headers #266

Open
torokp opened this issue Mar 24, 2015 · 5 comments
Open

Tables without headers #266

torokp opened this issue Mar 24, 2015 · 5 comments

Comments

@torokp
Copy link

torokp commented Mar 24, 2015

Would you consider to include feature to allow tables without headers:
http://stackoverflow.com/a/17543474/319372

Sample:

a | b | c
d | e | f

Instread of:

a b
d e
@adam-p
Copy link
Owner

adam-p commented Mar 24, 2015

As a workaround, that the suggestion in that SO answer almost works. If you put this in MDH's Primary Styling CSS:

th:empty {
  font-size: 0px;
  margin: 0;
  padding: 0;
  border: 0;
}

...You end up with this:

image

Notice the one-pixel-thicker grey line at the top? That's from the <tr> border. I can't figure out a way to get rid of it cleanly, since there's no CSS parent selector (like, "select the tr elements that are parents of empty th elements").

This will affect all tr elems in thead, regardless of whether they're empty or not:

thead > tr {
  padding: 0;
  margin: 0;
  border: 0;
}

But... the good news is that it doesn't seem to adversely affect the non-empty case! (...What the hell? I guess the tr border rule is redundant.)

Anyway, you still end up typing an empty header row, so I'm guessing this workaround doesn't satisfy you.

@adam-p
Copy link
Owner

adam-p commented Mar 24, 2015

Also note that you can create tables with HTML and then put whatever you want in them. Check out the info in the wiki: https://github.com/adam-p/markdown-here/wiki/Tips-and-Tricks#tables

@torokp
Copy link
Author

torokp commented Mar 24, 2015

What I want to spare is the source what I type in. I use Markdown Here (I really like) to spare me time for formatting. So if would work this, would help me when I need to paste info without headers:
a | b | c
d | e | f

To have an extra grey border, would not bother me, but I have to type two extra lines for source text, this is what I want to avoid. (only if possible, of course)

@adam-p
Copy link
Owner

adam-p commented Mar 24, 2015

I know. We'll leave the issue open.

AokiCE added a commit to glycoinfo/glic-old that referenced this issue Oct 3, 2016
added th:empty into Table for md style
md style isn't able to hide headers (adam-p/markdown-here#266)
@mertyildiran
Copy link

@adam-p I don't understand, how can I use your answer with GitHub Flavored Markdown?

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

No branches or pull requests

3 participants