Skip to content

Place prism css within light and dark theme rules

james kiger requested to merge 286-fix-code-line-numbers into master

Partially addresses #286 (closed) (missing line numbers on all prism stacktraces). This was broken when we added light and dark themes. Because the themed prism css rules are now wrapped with .light and .dark they are now more specific than global rules for prism plugins, so the padding rules needed for the line numbers to be visible don't get applied.

image

This PR adds the prism plugin rules to the light and dark themes, to keep specificity working as prism expects. The downside is a minor but irritating 0.75kb increase in css size that comes from essentially duplicating the plugin rule sets. A lighter weight alternative would be to just manually add in padding, but that wouldn't wouldn't address the more basic issue and would be vulnerable to changes in the prism package down the line.

Edited by james kiger

Merge request reports