Skip to content

Is it possible to display the language of the code block in the top right corner of the code block? #405

Answered by pomber
codersjj asked this question in Q&A
Discussion options

You must be logged in to vote

You can try something like this with CSS:

.ch-codeblock [data-ch-lang]::after{
  content: attr(data-ch-lang);
  position: absolute;
  right: 10px;
  top: 10px;
}

playground

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@codersjj
Comment options

Answer selected by codersjj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants