@require '~styles/variables'
@require '~styles-lib/mixins'

// Override code styling to always have the default code block background color
.content-viewer-code-block
	change-bg('darkest', true)
	position: relative
	font-size: $font-size-small !important
	border-radius: $border-radius-large !important

	& *::selection
		theme-prop('background', 'gray', true)

	&:before
		content: attr(data-annotation)
		position: absolute
		top: 4px
		right: 10px
		font-size: $font-size-small
		font-style: italic

	& > code
		display: inline-block
		margin-top: 4px

	& .tag // Reset due to .tag class interference
		all: initial
		font-family: inherit
		font-size: inherit

.content-viewer-nocode
	white-space: pre-wrap
