You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
785 B

2 years ago
  1. pre[class*="language-"].line-numbers {
  2. position: relative;
  3. padding-left: 3em;
  4. counter-reset: linenumber;
  5. }
  6. pre[class*="language-"].line-numbers > code {
  7. position: relative;
  8. white-space: inherit;
  9. }
  10. .line-numbers .line-numbers-rows {
  11. position: absolute;
  12. pointer-events: none;
  13. top: 0;
  14. font-size: 100%;
  15. left: -3.8em;
  16. width: 3em; /* works for line-numbers below 1000 lines */
  17. letter-spacing: -1px;
  18. border-right: 1px solid #999;
  19. -webkit-user-select: none;
  20. -moz-user-select: none;
  21. -ms-user-select: none;
  22. user-select: none;
  23. }
  24. .line-numbers-rows > span {
  25. display: block;
  26. counter-increment: linenumber;
  27. }
  28. .line-numbers-rows > span:before {
  29. content: counter(linenumber);
  30. color: #999;
  31. display: block;
  32. padding-right: 0.8em;
  33. text-align: right;
  34. }