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

padding style in .hljs-ln-numbers and .hljs-ln-code not working #75

Open
RocketMan opened this issue May 22, 2020 · 2 comments
Open

padding style in .hljs-ln-numbers and .hljs-ln-code not working #75

RocketMan opened this issue May 22, 2020 · 2 comments

Comments

@RocketMan
Copy link

In Usage, the examples give padding-right and padding-left in classes .hljs-ln-numbers and .hljs-ln-coding, respectively.

These styles appear to be ignored, because of explicit padding:0 in the DOM:

<style type="text/css">.hljs-ln{border-collapse:collapse}.hljs-ln td{padding:0}.hljs-ln-n:before{content:attr(data-line-number)}</style>

The above is added by this code:

One can force the padding to work in .hljs-ln-numbers and .hljs-ln-coding by appending !important to the padding style, but that seems somewhat hackish.

Expected: Padding specification in the user-supplied .hljs-ln-* classes should be accepted.

@guillaume-dorczynski
Copy link

guillaume-dorczynski commented May 30, 2020

Hello, thanks for the nice plugin, I have the same issue

Here is a workaround:

.hljs-ln-line {
  padding-left: 5px;
}

.hljs-ln-numbers {
  text-align: right;
  border-right: 1px solid #CCC; 
}

.hljs-ln-line.hljs-ln-n {
  padding-right: 5px;
}

But what I expected to use is:

.hljs-ln-line {
  padding-left: 5px;
}

.hljs-ln-numbers {
  text-align: right;
  border-right: 1px solid #CCC; 
  padding-right: 5px;
}

@olovskos
Copy link

olovskos commented Dec 2, 2020

Same here... Any updates on this?

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

4 participants